| ImageEn, unit iexHelperFunctions |
|
IEFileTypeSupportsPixelFormat
IEFileTypeSupportsPixelFormat
Declaration
procedure IEFileTypeSupportsPixelFormat(ImageFormat: TIOFileType; Compression: Integer; PixelFormat: TIEPixelFormat; HasAlphaChannel: Boolean;
out ExpectedPixelFormat: TIEPixelFormat; out SupportsAlpha: Boolean);
Description
Checks whether an image type (e.g. ioTIFF) and Compression (e.g. ord(ioTIFF_JPEG) supports a specified pixel format and
alpha channel.
Compression should be an ord() of a one of the following compression properties:
◼ioDICOM:
DICOM_Compression
◼ioIEN:
IEN_Compression
◼ioTIFF:
TIFF_Compression
◼ioPDF:
PDF_Compression
◼ioJ2K, ioJP2:
J2000_ColorSpace
◼ioBMP:
BMP_Compression
◼ioICO:
ICO_Format
Note:
◼This method also considers the active engine for that file type, e.g.
PNGEngine
◼You must add the iexHelperFunctions unit to your uses clause
◼For ioBMP it assumes
BMP_HandleTransparency = True
Example
// Can we save the current image to TIFF 48bit?
IEFileTypeSupportsPixelFormat( ioTIFF, ord(ImageEnView.IO.Params.TIFF_Compression), ie48RGB, ImageEnView.IEBitmap.HasAlphaChannel, expectedPixelFormat, supportsAlpha );
// supportsPixelFormat will be ie48RGB if this format supports ie48RGB, otherwise it will be the likely alternative format
// supportsAlpha will be true if this format supports an alpha channel