ImageEn, unit iexBitmaps

TIEBitmap.Alpha

TIEBitmap.Alpha

Declaration

property Alpha[x, y: Integer]: Byte;

Description

Specifies the alpha value of a pixel. 0 is transparent, 255 is opaque, 1 - 254 are partially transparent.

Note:
◼This function doesn't perform a range check test
◼This function doesn't check if the image has an alpha channel. It will be automatically created if needed
◼If AlphaLocation is iaAlphaChannel it returns the value from AlphaChannel
◼If AlphaLocation is iaRGBA it returns the value from the A channel of Pixels_ie32RGB

Example

// Show the alpha value at a position
if ImageEnView1.IEBitmap.HasAlphaChannel() = False
  lblAlpha.Caption := 'Alpha: None'
else
  lblAlpha.Caption := Format( 'Alpha: %d', [ ImageEnView1.IEBitmap.Alpha[x, y] ]);

See Also

◼AlphaChannel
◼AlphaFill
◼AlphaFillRect