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
| ImageID | Target image ID |
|---|---|
| MaskImageID | Image ID whose greyscale samples provide opacity values |
| Matte | Empty 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