AddImageJPXFromFile

Image handling

Description

Encodes a bitmap file as JPEG 2000 and adds the result as a JPXDecode image XObject

Syntax

Function TPDFlib.AddImageJPXFromFile(Const FileName: WideString; Quality, Lossless: Integer): Integer;

Parameters

FileNameSource bitmap file
QualityLossy quality from 1 to 100
Lossless1 selects reversible lossless encoding and 0 selects lossy encoding

Return values

Returns the new ImageID or 0 when the file cannot be decoded or encoded

Remarks

The image requires PDF 1.5 and automatically raises the output version when permitted, while PDF/A-1 rejects JPXDecode

See also

AddImageJPXFromStream, AddImageJPXFromString, EncodeImageToJPXFile