ImageEn, unit iexBitmaps

TIEBitmap.ColorProfile

TIEBitmap.ColorProfile

Declaration

property ColorProfile: TIEICC;

Description

Contains the color profile loaded from TIFF, JPEG, PNG or PSD file format that is used to render colors if ColorProfileMode = iecpRender.
It is read from InputICCProfile when the image is loaded (or DefaultICCProfile if specified).
Currently this is only used for ie24RGB and ieCMYK pixel format images.

Demo

Demo  Demos\Display\ColorProfiles\ColorProfiles.dpr

Examples

// Apply color profile on rendering (image is not modified, it only renders with the color profile)
ImageEnView1.IEBitmap.ColorProfileMode := iecpRender;
ImageEnView1.IO.NativePixelFormat := True;  // This means "Do not convert to RGB"
ImageEnView1.IO.LoadFromFile('cmyk-jpeg.jpg');

// Apply color profile to the image (image colors are changed, i.e. image is modified)
ImageEnView1.IEBitmap.ColorProfileMode := iecpApply;
ImageEnView1.IO.NativePixelFormat := False; // This means "Convert to RGB"
ImageEnView1.IO.LoadFromFile('cmyk-jpeg.jpg');

// Do not apply color profile (image is not modified, and is rendered without the color profile)
ImageEnView1.IEBitmap.ColorProfileMode := iecpIgnore;
ImageEnView1.IO.NativePixelFormat := False; // This means "Convert to RGB"
ImageEnView1.IO.LoadFromFile('cmyk-jpeg.jpg');


// Load a color profile to apply to the image if one is not available
ImageEnView1.IO.Params.DefaultICCProfile.LoadFromFile('C:\Windows\System32\spool\drivers\color\AdobeRGB1998.icc');
ImageEnView1.IEBitmap.ColorProfileMode := iecpApply;
ImageEnView1.IO.LoadFromFile('C:\input.tif');


// Load a TIFF containing a CMYK profile, save to JPEG maintaining the profile
ImageEnView1.IEBitmap.ColorProfileMode := iecpIgnore;   // or iecpRender
ImageEnView.IO.LoadFromFile('D:\Img with ICC Profile.tif');
ImageEnView1.IO.Params.JPEG_ColorSpace := ioJPEG_CMYK;
ImageEnView1.IO.SaveToFile('D:\Img with ICC Profile.jpeg');


// Render image with a custom color profile
ImageEnView1.IEBitmap.ColorProfile.LoadFromFile( 'D:\ColorProfile.icc' );
ImageEnView1.IEBitmap.ColorProfileMode := iecpRender;
ImageEnView1.Update();

See Also

ColorProfileMode
Color Management System