PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() ![]() ![]() ![]() This method inserts an image from a file using a second monochrome image file as a mask for transparency.
|
LONG AddImageWithMask ( BSTR fileName, BSTR maskFileName ) |
Parameters
fileName
Path to the image file
maskFileName
Path to the monochrome image file to use as a transparency mask
Return value
This method returns the new image index. If there is more than one image in a file, then it returns the index of the most recently added image.
Remarks
The return value is an image identifier in document's images collection and can be used in FlipImage, GetImageHeight, GetImageResolution, GetImageWidth, MakeImageGrayScale, MakeImageNegative, PlaceImageToCurrentPage, PDFPAGE_ShowImage.
Equivalent in new interface: IPDFDocument4::AddImageWithMask.
Example
How to Load an Image with a Mask
Delphi
[copy to clipboard]
{ PDF object is supposed to be created } PDF.BeginDoc; j := PDF.AddImageWithMask('picture.tiff', 'mask.tiff'); PDF.PDFPAGE_ShowImage(j, 0, 0, 122, 89, 0); PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created PDF->BeginDoc(); LONG j = PDF->AddImageWithMask("picture.tiff", "mask.tiff"); PDF->PDFPAGE_ShowImage(j, 0, 0, 122, 89, 0); PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created PDF.BeginDoc(); long j = PDF.AddImageWithMask("picture.tiff", "mask.tiff"); PDF.PDFPAGE_ShowImage(j, 0, 0, 122, 89, 0); PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.BeginDoc j = PDF.AddImageWithMask("picture.tiff", "mask.tiff") PDF.PDFPAGE_ShowImage j, 0, 0, 122, 89, 0 PDF.EndDoc
See Also