ImageCreateImageMask Method (SDFDoc, Byte, Int32, Int32) |
Create and embed an ImageMask. Embed the raw image data taking into account
specified compression hints. The ImageMask can be used as a stencil mask for
painting in the current color or as an explicit mask specifying which areas of
the image to paint and which to mask out. One of the most important uses of
stencil masking is for painting Character glyphs represented as bitmaps.
Namespace:
pdftron.PDF
Assembly:
pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax public static Image CreateImageMask(
SDFDoc doc,
byte[] image_data,
int width,
int height
)
Public Shared Function CreateImageMask (
doc As SDFDoc,
image_data As Byte(),
width As Integer,
height As Integer
) As Image
public:
static Image^ CreateImageMask(
[InAttribute] SDFDoc^ doc,
[InAttribute] array<unsigned char>^ image_data,
[InAttribute] int width,
[InAttribute] int height
)
pdftron.PDF.Image.CreateImageMask = function(doc, image_data, width, height);
Parameters
- doc
- Type: pdftron.SDFSDFDoc
- A document to which the image should be added. The 'Doc' object
can be obtained using Obj::GetDoc() or PDFDoc::GetSDFDoc().
- image_data
- Type: SystemByte
- The stream or buffer containing image data stored in 1 bit per
sample format. The image data must not be compressed and must follow PDF format for
sample representation (please refer to section 4.8.2 'Sample Representation' in PDF
Reference Manual for details).
- width
- Type: SystemInt32
- The width of the image, in samples.
- height
- Type: SystemInt32
- The height of the image, in samples.
Return Value
Type:
Image PDF::Image object representing the embedded ImageMask.
See Also