Declaration
procedure UpdateBitDepth(PixelFormat: TIEPixelFormat; OutputFileType: TIOFileType = ioUnknown)
Description
Updates
BitsPerSample and
SamplesPerPixel to ensure they are valid for the specified PixelFormat (when saving).
If OutputFileType is specified, further checks are performed for ioGIF and ioPNG format.
The following properties will be set:
◼BitsPerSample◼SamplesPerPixel◼BMP_HandleTransparency◼J2000_ColorSpace◼JPEG_ColorSpace◼TIFF_JPEGColorSpace◼TIFF_PhotometInterpretNote: This is the same as enabling
AutoSetBitDepth// Ensure Params properties are valid for the image pixel format
ImageEnView1.IO.Params.UpdateBitDepth( ImageEnView1.IEBitmap.PixelFormat, ioGIF );
ImageEnView1.IO.SaveToFile( 'C:\Image.gif' );