AlphaToGrayscale

procedure AlphaToGrayscale(Dst, Src: TCustomBitmap32);

Description

This function transforms an alpha channel from Src bitmap into grayscale (R=A, G=A, B=A) color in Dst bitmap. If necessary, Dst bitmap is resized to fit Src dimesions.

It writes only RGB components into Dst. The alpha channel (A) remains intact, provided that dimensions of Dst and Src match before AlphaToGrayScale call.

This function is useful when it is necessary to visualize the alpha channel, or when you want to store it as standard bitmap into a file.

See Also

TCustomBitmap32, IntensityToAlpha