Image format

Mark Waddingham 36degrees at runrev.com
Wed Aug 4 16:54:30 EDT 2004


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
>


More information about the Use-livecode mailing list