Re: export imagedata into a file ?

2018-05-08 Thread Jacques Hausser via use-livecode
Sorry, I didn’t read carefully.
But I think that the imageData needs a kind of “frame” to become an image. So 
the simplest way to do it is to populate, for instance, an hidden image with 
the imageData and then export it.

> Le 8 mai 2018 à 16:17, jbv via use-livecode  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@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: export imagedata into a file ?

2018-05-08 Thread Colin Holgate via use-livecode
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 
>  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
> 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@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: export imagedata into a file ?

2018-05-08 Thread Jacques Hausser via use-livecode
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 
mailto:use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

export imagedata into a file ?

2018-05-08 Thread jbv via use-livecode
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode