Debenu Quick PDF logo

SetImageMaskFromImage

Image handling, Page layout

Description

Use this function to use another image as a transparency mask for the selected image. The mask image must be a grayscale image. If it is not specifically prepared it will be added as a soft mask which only works with Acrobat 5.0 and later. If it is specially prepared using the SetImageAsMask function you can choose whether the image will be a stencil mask (which will work with Acrobat 4.0 and later) or a soft mask (which will only work with Acrobat 5.0 and later). Remember that soft masks and stencil masks treat opaque and transparent in an opposite fashion. You may want to call ReverseImage on your mask image to ensure consistent results. For compatibility with Acrobat 6.0 and later it is important to set the transparency group for the page to ensure RGB colors in your image are not converted to CMYK yielding strange results. Use the SetPageTransparencyGroup function for this. To avoid problems with Acrobat 4.0 you may want to remove the /Decode array from the mask image. This can be achieved with the ReverseImage function setting the Reset parameter to 0.

Syntax

Delphi

function TDebenuPDFLibrary1511.SetImageMaskFromImage(ImageID: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1511.PDFLibrary::SetImageMaskFromImage(
  ImageID As Long) As Long

DLL

int DPLSetImageMaskFromImage(int InstanceID, int ImageID)

Parameters

ImageID The ID of the image to use as the mask

Copyright © 2014 Debenu. All rights reserved. AboutContactBlogNewsletterSupport