FMX.Graphics.TBitmap.CreateFromBitmapAndMask
Delphi
constructor CreateFromBitmapAndMask(const Bitmap, Mask: TBitmap);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | FMX.Graphics.pas | FMX.Graphics | TBitmap |
Description
Constructs a TBitmap object by applying a mask to an existing TBitmap object.
The Bitmap
parameter specifies the TBitmap on which the mask is applied.
The Mask
parameter is the applied mask.
The created TBitmap has the value of the Alpha channel of each color pixel equal with the value of the Red channel in the Mask
.
Tip: For a better result, use a grayscale image for
Mask
. It has an equal amount of green, red, and blue.
Tip: The mask and the base bitmap must have the same dimensions. Otherwise the new TBitmap will have the dimensions equal to 0.
See Also
- FMX.Graphics.TBitmap.Create
- FMX.Graphics.TBitmap.CreateFromFile
- FMX.Graphics.TBitmap.CreateFromStream
- FMX.Graphics.TBitmap.Destroy
- System.TObject.Free