export imagedata into a file ?
colinholgate at gmail.com
Tue May 8 11:03:04 EDT 2018
I was failing to even get the image in! But, the thing I would have tried if that had worked would be to set the paintCompression of the image to “jpeg".
> On May 8, 2018, at 10:17 AM, jbv via use-livecode <use-livecode at lists.runrev.com> wrote:
> Hi list,
> I have a script that starts as follows :
> put URL "binfile:/myFile.jpg" into tImageData
> put tImageData into image "Image_test"
> put the imagedata of image "Image_test" into tImageData
> -- tImageData processing
> After tImageData is processed, I would like to export
> its content directly into a file.
> I tried :
> put tImageData into URL "binfile:/test.jpg"
> but the file is considered corrupted and can't be opened.
> I also tried :
> put tImageData into URL "binfile:/test.jpg" as JPEG
> but it returns an error.
> I know I can set the imagedata of an image to the content
> of tImageData, and then use "export snapshot", but for some
> reasons too long to explain, I would like to follow a different
> So, How can I export the binary content of tImageData to
> a jpeg or png file that can be opened like any similar
> file ?
> Thanks in advance,
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode