IntensityToAlpha

procedure IntensityToAlpha(Dst, Src: TCustomBitmap32);

Description

This function transforms the color intensity, stored in RGB channels of Src bitmap into the alpha channel in Dst. If necessary, the Dst bitmap is resized to fit Src dimesions.

The intensity is calculated using the Intensity function.

The function writes only the alpha component into Dst. Other channels remain intact (provided dimensions of Dst and Src match before IntensityToAlpha call).

IntensityToAlpha is useful when it is necessary to load an alpha channel stored in as an image.

The in-place operation is fully supported, that is Dst may be the same as Src.

See Also

AlphaToGrayscale, Intensity, TCustomBitmap32