PNG's, alphadata and maskdata

Scott Rossi scott at tactilemedia.com
Wed Jan 27 06:18:49 EST 2010


Recently, David Bovill wrote:

> I'm chopping up a some png's that have transparent backgrounds using Rev, by
> getting areas of the image using the imagedata, creating new images and then
> exporting these cut-outs. I've got a few questions about images, masks and
> alpha channels:
> 
>    - To re-create a PNG - do I ned to worry about maskdata - or just copy
>    over the imagedata and the alphadata then export?

Generally, PNG would use image/alphaData, but also remember that you can
transfer both properties in one pass by using the text property (odd, yes,
but that's what does it):

  set the text of img 1 to the text of img 2


>    - Which of the image file formats supported by Rev support alphadata?

PNG.


>    - Is maskdata used as a part of any image format?

Since maskData is transparency that is only on or off, I believe it's only
suitable for GIF and possibly 8 bit PNG (a PNG that contains no more than
256 colors).


>    - What happens when I apply maskdata or alphadata to images displayed in
>    Rev that do not support these features?

I believe they will be converted to PNG format.  I seem to recall hearing
that any time an image is manipulated within Rev, it gets converted to PNG
format.  Not sure if anything has changed with Rev 4.5

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design





More information about the use-livecode mailing list