ImageEn, unit iexBitmaps

TIOTIFFPhotometInterpret

TIOTIFFPhotometInterpret

Declaration

type TIOTIFFPhotometInterpret = (ioTIFF_WHITEISZERO, ioTIFF_BLACKISZERO, ioTIFF_RGB, ioTIFF_RGBPALETTE, ioTIFF_TRANSPMASK, ioTIFF_CMYK, ioTIFF_YCBCR, ioTIFF_CIELAB);

Description

Value Description Supported Pixel Formats
ioTIFF_WHITEISZERO Grayscale image where 0 represents white and maximum value represents black ie1g, ie8p, ie8g, ie16g, ie32f
ioTIFF_BLACKISZERO Grayscale image where 0 represents black and maximum value represents white (most common) ie1g, ie8p, ie8g, ie16g, ie32f
ioTIFF_RGB RGB full color image with separate red, green and blue samples ie8p, ie24RGB, ie32RGB, ie48RGB
ioTIFF_RGBPALETTE Palette (indexed) color image using a color lookup table (ColorMap) ie1g, ie8p, ie8g
ioTIFF_TRANSPMASK Transparency mask where each pixel defines a transparency level ie1g, ie8p, ie8g, ie16g, ie32f
ioTIFF_CMYK CMYK color separated image for printing with cyan, magenta, yellow and black channels ieCMYK
ioTIFF_YCBCR YCbCr color space image (luminance and chrominance), commonly used with JPEG compression ie24RGB, ie32RGB, ie48RGB
ioTIFF_CIELAB CIE Lab perceptually uniform color space with lightness and color-opponent dimensions ieCIELab

Note: To save using the following: ioTIFF_WHITEISZERO, ioTIFF_BLACKISZERO, ioTIFF_RGBPALETTE, ioTIFF_TRANSPMASK, the SamplesPerPixel of the image must be 1, or the PixelFormat one of ie1g, ie8p, ie8g, ie16g, ie32f with AutoSetBitDepth enabled

Example

ImageEnView1.IO.Params.TIFF_Compression := ioTIFF_UNCOMPRESSED;
ImageEnView1.IO.Params.BitsPerSample    := 1;
ImageEnView1.IO.Params.SamplesPerPixel  := 1;
ImageEnView1.IO.Params.TIFF_PhotometInterpret := ioTIFF_BLACKISZERO;
ImageEnView1.IO.SaveToFile('D:\output.tif');

// Which is the same as...
IEGlobalSettings().AutoSetBitDepth := True;
ImageEnView1.IEBitmap.PixelFormat := ie1g;
ImageEnView1.IO.Params.TIFF_Compression := ioTIFF_UNCOMPRESSED;
ImageEnView1.IO.Params.TIFF_PhotometInterpret := ioTIFF_BLACKISZERO;
ImageEnView1.IO.SaveToFile('D:\output.tif');