THPDFLoadedImageInfo Record
Describes one image XObject discovered in a loaded document, returned by THotPDF.GetLoadedImageInfo with geometry, filter, color space, and decodability
Declaration
THPDFLoadedImageInfo= record
Width: Integer;
Height: Integer;
BitsPerComponent: Integer;
ColorComponents: Integer;
Filter: AnsiString;
ColorSpace: AnsiString;
IsImageMask: boolean;
ObjectNumber: Integer;
Decodable: boolean;
end;
Unit
HPDFObjs
Fields
| Field | Purpose |
|---|---|
Width | Image width in pixels |
Height | Image height in pixels |
BitsPerComponent | Bits per color component as stored in the stream |
ColorComponents | Post-decode component count: 1 for Gray, 3 for RGB, 4 for CMYK |
Filter | Name of the stream filter, such as FlateDecode or DCTDecode |
ColorSpace | Post-decode color space name matching ColorComponents |
IsImageMask | True when the XObject is an image mask rather than a color image |
ObjectNumber | Indirect object number of the image XObject in the loaded document |
Decodable | True when the running build can turn this filter into a bitmap through ExtractLoadedImage |
Usage notes
- Enumerate images with
GetLoadedImageCount, then read one entry withGetLoadedImageInfo(ImageIndex, AInfo) Decodableis the gate:ExtractLoadedImagereturns nil for images this build cannot decode- The record is metadata only; pixel data comes from
ExtractLoadedImageorExtractLoadedImageToStream