BitmapAlpha property (Main Control)

Visual Basic example
Visual C++ 4.0 example

Visual J++ example

Syntax OLE_HANDLE BitmapAlpha

Overview:  Refer to Working with the Alpha Channel.

Remarks

Lets you get or set alpha-channel data in a bitmap.

Typically, an alpha channel contains a mask that is used for transparency. This property, used with the region processing methods, lets you implement transparency in saved images.

When you get the value of this property (assigning it to another Main Control) you get an 8-bit grayscale bitmap that matches the current alpha channel data. When you set the value from another Main Control, LEADTOOLS interprets the bitmap data, if necessary, to update the alpha channel data.

Only 16- and 32-bit images can have an alpha channel. If you set this property in a control that has any other color resolution, the bitmap is converted to 32-bit. (If you want 16-bit, you should change it using the ColorRes method, if necessary, before setting the property.)

See Also

Elements:  SetRgnColor method, GetRgnHandle method, SetRgnHandle method

Topics:  Implementing Transparency