ImageEn, unit iexBitmaps

TIEBitmap.Negative

TIEBitmap.Negative


Declaration

procedure Negative(); overload;
procedure Negative(Ch: TIEChannels); overload;


Description

Invert the color of all pixels.
Second overload allows you to specify which channels to invert. The PixelFormat must support color, e.g. ie24RGB, ie32RGB, ie48RGB, ieCIELab or ieCMYK.


Example

// Invert the bitmap colors
IEBitmap.Negative();

// Invert the red and green channels
IEBitmap.Negative( [iecRed, iecGreen] );

// Invert the alpha channel (so transparent areas become opaque, and vice versa)
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update();