AddImageCCITTFromStream

Image handling

Description

Adds a 1-bit bitmap image from a stream using CCITT Group 3 or Group 4 compression

Syntax

Delphi

Function TPDFlib.AddImageCCITTFromStream(InStream: TStream; CompressionType, Options: Integer): Integer;

Parameters

InStreamBitmap stream to load from the current stream position
CompressionType31 for Group 3 1D, 32 for Group 3 2D, or 42 for Group 4 2D
OptionsBit 0 writes BlackIs1; bit 1 writes Interpolate

Return values

Returns the new ImageID, or 0 if the bitmap cannot be loaded or encoded

Remarks

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

See also

AddImageCCITTFromFile, AddImageCCITTFromString, AddImageDirectFromString