ImageType
Image handling
Description
Returns the storage type of the selected image
Syntax
Delphi
Function TPDFlib.ImageType: Integer;ActiveX
Function PDFlib::ImageType() As LongDLL
int DLImageType(int InstanceID);Return values
| 0 | No image is selected |
|---|---|
| 1 | JPEG |
| 2 | BMP |
| 3 | TIFF, including a native CCITT strip in a standalone TIFF wrapper |
| 4 | PNG |
| 5 | WMF |
| 6 | EMF |
| 7 | GIF |
| 8 | WebP |
| 9 | Standalone JBIG2 with the original page and global segments |
JBIG2 decoding limits
Internal bitmap decoding accepts sequential JBIG2 streams and standalone random-access files with known segment lengths. Local or global capability profiles are supported, including unknown profile identifiers. Random-access file organization does not add an API for selecting arbitrary pages; the decoder continues to return its first-page bitmap. Custom Huffman tables are supported for symbol dictionaries and text regions, including Huffman refinement bitmap sizes. Prefixes longer than 32 bits, tables with more than 65,536 entries, and unknown or oversized segment lengths are rejected explicitly. Direct users of TPLJBIG2Decoder can inspect LastError after a failed load; this diagnostic is separate from TPDFlib.LastErrorCode
Native JBIG2 extraction preserves encoded segments without decoding them, so storage type 9 does not imply that every segment combination can be rendered by the internal decoder