AddImageJBIG2FromFileEx
Images
Description
Loads a bitmap file, converts it to monochrome image data, and stores it as a JBIG2 image XObject using named option parameters
Syntax
Delphi
Function TPDFlib.AddImageJBIG2FromFileEx(Const FileName: WideString; Interpolate, SymbolExtract, UseExternalEncoder, SkipBlackDots, BlackDotSize, LossyLevel: Integer): Integer;
Parameters
| FileName | The bitmap file to encode |
|---|---|
| Interpolate | Writes the image interpolation flag when nonzero |
| SymbolExtract | Requests symbol dictionary extraction when the active encoder backend supports it |
| UseExternalEncoder | Prefers the external JBIG2 encoder backend when available |
| SkipBlackDots | Enables isolated black-dot cleanup before encoding when nonzero |
| BlackDotSize | Maximum isolated black-pixel cluster size removed during cleanup |
| LossyLevel | Cleanup aggressiveness hint from 0 to 9 for scanned monochrome input |
Return values
Returns the new ImageID, or 0 when the file cannot be read or encoded
Remarks
The function maps the named parameters to the same encoding path used by AddImageJBIG2FromFile, which preserves compatibility with existing option bitmasks