SetImageSoftMaskEx

Image handling, Transparency

Description

Converts MaskImageID to a greyscale soft mask, applies an optional matte colour, and attaches it to ImageID

Syntax

Delphi

Function TPDFlib.SetImageSoftMaskEx(ImageID, MaskImageID: Integer; Const Matte: WideString): Integer;

Parameters

ImageIDTarget image ID
MaskImageIDImage ID whose greyscale samples provide opacity values
MatteEmpty string to omit /Matte, or a PDF numeric array with one through four colour components from 0 through 1 appropriate for the target image colour space

Return values

Returns ImageID on success, otherwise 0

Remarks

The target and mask images must have identical pixel dimensions and must be different image objects

The document version is raised to PDF 1.4 when the mask is attached

PDF/A-1 and PDF/X-1 modes reject this operation because they do not permit transparency

See also

SetImageSoftMaskFromImage, NewSoftMaskGraphicsState, FlattenTransparency