Image format

Takaaki Furukawa tac at mac.com
Wed Aug 4 18:19:43 CDT 2004


Hi Mark,

Thank you for the information.
The file was still corrupt after using "binfile:", but I found out 
something.
I hexdump'ed the corrupted file, and obviously the PNG file did not 
have any
headers. But files created with "export" command (which is not 
supported by
Revolution Engine 2.5) do have headers. So it looks like "put into url" 
command
does not add any headers to the file to be saved. And I wonder if what 
kind of
format an image is in when the image is "put into url."

On Aug 4, 2004, at 1:54 PM, Mark Waddingham wrote:

> Hi Takaaki,
>
> The reason you are getting corrupted PNG's is probably because you are
> putting the image into a 'text' URL. You should do
>   put myImage into URL "binfile:imagedir/myimage.png"
>
> To clarify what's going on, if you put something into a 'file' URL,
> Revolution will assume what you are putting is text and output the
> appropriate end-of-line markers for the platform you are on. Using a
> 'binfile' URL will stop Revolution meddling in this way :o)
>
> Some of you may have noticed the 'corrupt PNG messages' appearing on 
> the
> console in an earlier alpha/beta of Revolution 2.5 then this was the
> cause... (Ahem) I kinda got caught out on this one when importing 
> images
> for revOnline...
>
> Best wishes,
>
> Mark.
>
> ---------------------------------------------------------------------
>   Mark Waddingham ~ 36degrees @ runrev.com ~ http://www.runrev.com/
>        Runtime Revolution ~ User-Centric Development Tools
>
> On Wed, 4 Aug 2004, Takaaki Furukawa wrote:
>
>> I would like to export the data of an image object in either PNG or 
>> JPG
>> format in CGI.
>> But when I do this, I get a corrupted PNG file. I use Revolution 
>> Engine
>> 2.5
>> (which doesn't seem to support "export image" command yet).
>>   Maybe "put into url" cannot be used with image objects?
>>
>>> set the paintCompression to PNG
>>> import snapshot from rect "0,0,100,100"
>>> put last image into myImage
>>> put myImage into url "file:imagedir/myimage.png"
>>
>> Takaaki Furukawa
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list