THPDFInlineImgKeys Record
保存內嵌影像的正規化鍵/值集合,縮寫已展開為完整字典名稱
宣告
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;
單元
HPDFContentStream
欄位
| 欄位 | 用途 |
|---|---|
Width | 影像寬度(像素),由 /W 展開 |
Height | 影像高度(像素),由 /H 展開 |
BitsPerComponent | 每個色彩成分的位元數,由 /BPC 展開 |
ColorSpace | 完整色彩空間名稱,例如 DeviceGray,由 /CS 展開 |
Filter | 完整濾器管線名稱,例如 FlateDecode,由 /F 展開 |
DecodeParms | 解碼參數的原始 token 文字,由 /DP 展開 |
ImageMask | 內嵌影像為影像遮罩時為 True,來自 /IM |
Decode | 解碼陣列的原始 token 文字,例如 [1 0],來自 /D;缺席時為空。renderer 會用它替樣本值為 1 的影像遮罩套用 /D [1 0] 上色 |
HasWidth | BI 字典有提供 /W 時為 True |
HasHeight | 有提供 /H 時為 True |
HasBPC | 有提供 /BPC 時為 True |
使用說明
- 語彙分析器在掃描
BI到ID的過程中填入此記錄,並存放在BItoken 上;轉譯器據此建構拋棄式影像串流供解碼使用 - 縮寫(包括色彩空間與濾器的簡短形式)都在這裡展開,解碼程式不必再查內嵌影像簡寫表
- 用
HasWidth、HasHeight與HasBPC區分「鍵不存在」與「值為零」