PdfDocumentGdiExtensions.AddImage Method (PdfDocument, Image, Image)

Creates a new image with the data and properties of specified Image, applies mask constructed from specified Image to it and adds resulting image to the end of the collection of document images.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public static PdfImage AddImage(
	this PdfDocument doc,
	Image image,
	Image mask
)
VB
<ExtensionAttribute>
Public Shared Function AddImage ( 
	doc As PdfDocument,
	image As Image,
	mask As Image
) As PdfImage

Parameters

doc
Type: BitMiracle.Docotic.Pdf.PdfDocument
The document.
image
Type: System.Drawing.Image
The existing Image from which to create a PdfImage.
mask
Type: System.Drawing.Image
The existing Image from which to create the mask for the PdfImage.

Return Value

Type: PdfImage
The created PdfImage.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PdfDocument. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Mask images with only one frame (page) are supported. This method creates an image for the first frame (page) of the source image only.

See Also