THPDFInlineImgKeys Record
Holds the normalized key/value set of an inline image with abbreviations already expanded to full dictionary names
Declaration
THPDFInlineImgKeys= record
Width: Integer; // /W -> /Width
Height: Integer; // /H -> /Height
BitsPerComponent: Integer; // /BPC -> /BitsPerComponent
ColorSpace: AnsiString; // /CS -> /ColorSpace, full name (DeviceGray..)
Filter: AnsiString; // /F -> /Filter, full pipeline name (FlateDecode..)
DecodeParms: AnsiString; // /DP -> /DecodeParms, raw token text if present
ImageMask: Boolean; // /IM -> /ImageMask
Decode: AnsiString; // /D -> /Decode, raw array text if present
HasWidth: Boolean; // whether /W was supplied
HasHeight: Boolean; // whether /H was supplied
HasBPC: Boolean; // whether /BPC was supplied
end;
Unit
HPDFContentStream
Fields
| Field | Purpose |
|---|---|
Width | Image width in pixels, expanded from /W |
Height | Image height in pixels, expanded from /H |
BitsPerComponent | Bits per color component, expanded from /BPC |
ColorSpace | Full color space name such as DeviceGray, expanded from /CS |
Filter | Full filter pipeline name such as FlateDecode, expanded from /F |
DecodeParms | Raw token text of the decode parameters, expanded from /DP |
ImageMask | True when the inline image is an image mask, from /IM |
Decode | Raw token text of the decode array, such as [1 0], from /D; empty when absent. The renderer uses it to paint an image mask with /D [1 0] where the samples are 1 |
HasWidth | True when /W was supplied in the BI dictionary |
HasHeight | True when /H was supplied |
HasBPC | True when /BPC was supplied |
Usage notes
- The tokenizer fills this while scanning
BItoIDand stores it on theBItoken; the renderer builds a throwaway image stream from it for decoding - Abbreviations, including the color space and filter short forms, are expanded here so decode code never needs the inline-image shorthand table
- Use
HasWidth,HasHeight, andHasBPCto tell an absent key apart from a zero value