ImageEn, unit iexBitmaps

TIEBitmap.PixelFormat

TIEBitmap.PixelFormat


Declaration


property PixelFormat: TIEPixelFormat;


Description


Specifies the image pixel format.
You can set PixelFormat to convert an image from one format to another.


Examples


// Set pixel format to 8bit gray-scale
ImageEnView1.IEBitmap.PixelFormat := ie8g;
ImageEnView1.Update();

// Save 32bit gray-scale TIFF (ie32f)
// Note: Compression must be: ioTIFF_UNCOMPRESSED, ioTIFF_LZW, ioTIFF_PACKBITS or ioTIFF_ZIP
ImageEnView1.LegacyBitmap := false;
ImageEnView1.IEBitmap.PixelFormat := ie32f;
ImageEnView1.IO.Params.BitsPerSample := 32;
ImageEnView1.IO.Params.SamplesPerPixel := 1;
ImageEnView1.IO.Params.TIFF_PhotometInterpret := ioTIFF_BLACKISZERO;
ImageEnView1.IO.Params.TIFF_Compression := ioTIFF_UNCOMPRESSED;
ImageEnView1.IO.SaveToFileTIFF('D:\GrayTiff32.tiff');