AddImageJPXFromStream
Image handling
Description
Encodes a bitmap stream as JPEG 2000 and adds the result as a JPXDecode image XObject
Syntax
Function TPDFlib.AddImageJPXFromStream(InStream: TStream; Quality, Lossless: Integer): Integer;
Parameters
| InStream | Source bitmap stream whose position is restored before return |
|---|---|
| Quality | Lossy quality from 1 to 100 |
| Lossless | 1 selects reversible lossless encoding and 0 selects lossy encoding |
Return values
Returns the new ImageID or 0 on failure
Remarks
The method keeps ownership of neither stream and embeds the encoded bytes directly without a second raster conversion
See also
AddImageJPXFromFile, AddImageJPXFromString, EncodeImageToJPXStream