THPDFJBIG2Encoder.EncodeToByteArray Method
Encodes one-bit scanlines into JBIG2 image bytes with an overload for global segments and explicit options
Declaration
Function EncodeToByteArray(Const Scanlines: TJBIG2ScanlineArray; Width, Height: Integer; Var ImageData: TJBIG2ByteArray): Boolean; Overload;
Function EncodeToByteArray(Const Scanlines: TJBIG2ScanlineArray; Width, Height: Integer; Var ImageData, GlobalData: TJBIG2ByteArray; Const Options: TJBIG2EncodeOptions): Boolean; Overload;
Unit
HPDFJBIG2
Parameters
| Name | Purpose |
|---|---|
Scanlines | Input used by EncodeToByteArray |
Width | Page coordinate or size value expressed in the current HotPDF coordinate space |
Height | Page coordinate or size value expressed in the current HotPDF coordinate space |
ImageData | Raw byte payload embedded or validated by this API |
GlobalData | Raw byte payload embedded or validated by this API |
Options | Input used by EncodeToByteArray |
Return value
Returns a Boolean value
Usage notes
- Width and Height must match the supplied scanline array
- The overload with TJBIG2EncodeOptions controls symbol dictionaries, lossy matching, and backend selection