EncodeImageToJPXStream
Image handling
Description
Decodes a bitmap stream and writes a JPEG 2000 image in a standard JP2 container
Syntax
Function TPDFlib.EncodeImageToJPXStream(InStream, OutStream: TStream; Quality, Lossless: Integer): Integer;
Parameters
| InStream | Source bitmap stream whose position is restored before return |
|---|---|
| OutStream | Destination stream replaced with the JP2 payload |
| Quality | Lossy quality from 1 to 100 |
| Lossless | 1 selects reversible lossless encoding and 0 selects lossy encoding |
Return values
Returns 1 on success or 0 for unsupported input, invalid options or encoding failure
Remarks
The VCL path accepts native bitmap streams and image formats exposed through installed GDI+ codecs, while NOVCL builds return 0 because the bundled encoder consumes a VCL bitmap