AddImageJBIG2DirectFromStream

Image handling

Description

Adds an already-encoded JBIG2 image stream from a stream as a PDF image XObject

Syntax

Delphi

Function TPDFlib.AddImageJBIG2DirectFromStream(InStream: TStream; Width, Height, Options: Integer): Integer;

Parameters

InStreamStream containing JBIG2 image bytes from the current stream position
WidthImage width in pixels
HeightImage height in pixels
OptionsBit 0 writes Interpolate

Return values

Returns the new ImageID, or 0 when dimensions are invalid

Remarks

Use this wrapper when the Delphi class API is preferred over assembling the lower-level PDF objects manually

See also

AddImageJBIG2DirectFromFile, AddImageJBIG2DirectFromString, AddImageDirectFromString