AddImageTransparentFromStream

Image handling

Description

Adds an image from a stream and immediately applies an RGB color-key transparency mask

Syntax

Delphi

Function TPDFlib.AddImageTransparentFromStream(InStream: TStream; FromRed, FromGreen, FromBlue, ToRed, ToGreen, ToBlue: Double; Options: Integer): Integer;

Parameters

InStreamImage stream to import
FromRed, FromGreen, FromBlueLower RGB color-key bound in the 0 to 1 range
ToRed, ToGreen, ToBlueUpper RGB color-key bound in the 0 to 1 range
OptionsImage import options passed to AddImageFromStream

Return values

Returns the new ImageID, or 0 if the image import or mask assignment fails

Remarks

Use this entry when image bytes are already available as a stream and a color-key mask should be assigned in one call

See also

AddImageTransparentFromFile, AddImageTransparentFromString, SetImageMask