PNG with No Alpha Channel?
Klaus Major
klaus at major-k.de
Mon Jun 9 14:11:02 EDT 2008
Hi Trevor,
> I need to export a PNG image from a Revolution image control that
> has no alpha channel information whatsoever.
>
> The 'export' command seems to always include the alpha channel even
> if there are no transparent areas in the image.
>
> I've also tried loading an image file into an image control an
> transferring the imageData to another image and then storing the
> text of the second image in a file (paintCompression set to "png").
> The file still appears to have an alpha channel though. qrtPDF says
> the file does and Preview on OS X gives me the option of whether or
> not to include the Alpha channel if I try to export the resulting
> image from Preview.
>
> Anyone know how to produce a PNG without an alpha channel using
> Revolution?
Yes :-)
With alpha:
...
export snapshot from rect(the rect of img 1) of img 1 to file f1 as PNG
...
Without alpha:
...
export snapshot from rect(the rect of img 1) of window(the windowid of
this stack) to file f2 as PNG
...
> Thanks,
>
> --
> Trevor DeVore
> Blue Mango Learning Systems
> ScreenSteps: http://www.screensteps.com
> Developer Resources: http://revolution.bluemangolearning.com
>
Best
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list