AddImageTransparentFromFile

Image handling

Description

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

Syntax

Delphi

Function TPDFlib.AddImageTransparentFromFile(Const FileName: WideString; FromRed, FromGreen, FromBlue, ToRed, ToGreen, ToBlue: Double; Options: Integer): Integer;

Parameters

FileNameImage file 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 AddImageFromFile

Return values

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

Remarks

The helper keeps the new image selected and delegates mask construction to SetImageMask

See also

AddImageTransparentFromStream, AddImageTransparentFromString, SetImageMask