export imagedata into a file ?

Jacques Hausser jacques.hausser at unil.ch
Tue May 8 10:51:05 EDT 2018


Hi jbv

I’m using not the imageData, but the image itself

Export image  “mage_testI” to URL”binfile:/test.jpg” as JPEG

It works

Jacques

Le 8 mai 2018 à 16:17, jbv via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> a écrit :

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
path.
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,
jbv



_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list