Error getting tags :
error 404Error getting tags :
error 404 alphaData | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle
set the alphaData of image to binaryData
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
None required
Specifies the binary data that makes up the alpha channel of the picture in an image object.

set the alphaData of image "Hellacious" to savedAlphaChannel
if charToNum(char x of the alphaData of image 1) is 255 then next repeat

Additional Comments
Expander triangle

Use the alphaData property to control the transparency of the pixels in an image.


The alphaData of an image consists of a sequence of binary values.


Each pixel is represented by 8 bits (1 byte) of alpha channel data, with pixels numbered from the top left corner of the image, left to right, then top to bottom.

A value of zero means the pixel is fully transparent; a value of 255 is fully opaque; and values in between indicate a level of partial translucency.

Gotcha: Since the alphaData of an image is binary data rather than text, trying to display the data in a field may cause unexpected behavior.

Since each pixel is represented by 8 bits (1 byte or 1 character), you can obtain the numeric value for a given pixel using the charToNum function. For example, the numeric value of the alphaData for the tenth pixel is given by the expression charToNum(char 10 of the alphaData of image).

Gotcha: When changing the alphaData property, make sure the new data is the correct size: 1 byte per pixel in the image. If you set an image's alphaData property to data whose total length is incorrect, the image appearance may be distorted.

User Comments
Expander triangle