AddImageTransparentFromString

Image handling

Description

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

Syntax

Delphi

Function TPDFlib.AddImageTransparentFromString(Const Source: AnsiString; FromRed, FromGreen, FromBlue, ToRed, ToGreen, ToBlue: Double; Options: Integer): Integer;

Parameters

SourceImage bytes stored in an AnsiString
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 AddImageFromString

Return values

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

Remarks

Use this entry for in-memory image data when a color-key mask should be assigned in one call

See also

AddImageTransparentFromFile, AddImageTransparentFromStream, SetImageMask