ImageEn, unit iexBitmaps

TIEICC.ConvertBitmap

TIEICC.ConvertBitmap

Declaration

function ConvertBitmap(Bitmap: TIEBaseBitmap; DestPixelFormat: TIEPixelFormat = ie24RGB; DestProfile: TIEICC = nil): Boolean;

Description

Transforms the same bitmap from current profile to the destination profile.
If DestProfile = nil, it is converted to sRGB.
Returns False if it cannot perform the transformation.

Example

// Apply InputICCProfile (VibranceMetallic_8400.icc) color profile to an image and output as OutputICCProfile (Defaults to sRGB)
// Note: This permanently changes the colors of the image
ImageEnView1.IO.LoadFromFile('C:\Wedding.jpg');
ImageEnView1.IO.Params.InputICCProfile.LoadFromFile('C:\VibranceMetallic_8400.icc');
ImageEnView1.IO.Params.InputICCProfile.ConvertBitmap( ImageEnView1.IEBitmap );
ImageEnView1.Update();  // Show changes to bitmap in viewer