BitmapAlpha property (Main Control)

C++ 4.0 example

Delphi example

 

Builder Syntax

TBitmapHandle BitmapAlpha

Delphi Syntax

BitmapAlpha: TBitmapHandle

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.)

This method does not support signed data images, but only DICOM images are supported as signed data. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image, other than a DICOM image, is passed to this method.

See Also

Elements:

SetRgnColor method, GetRgnHandle method, SetRgnHandle method

Topics:

Implementing Transparency