alphaData | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | image | ||||||
Summary | Specifies the binary data that makes up the alpha channel of the picture in an image object. | ||||||
Introduced | 1.1 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: field, image Property: maskData, blendLevel, pixels, imageData Glossary: property, binary file, pixel, expression, binary, alpha channel Control Structure: function | ||||||
Description | Use the alphaData property to control the transparency of the pixels in an image. 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.
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).
| ||||||
Tags | multimedia |