Table of Contents

Method AddImage

Namespace
BitMiracle.Docotic.Pdf.Gdi
Assembly
BitMiracle.Docotic.Pdf.Gdi.dll

AddImage(PdfDocument, Image)

Adds new image(s) with the data and properties of specified Image to the end of the collection of document images.

public static PdfImage? AddImage(this PdfDocument doc, Image image)

Parameters

doc PdfDocument

The document.

image Image

The existing Image from which to create PdfImage(s).

Returns

PdfImage

The PdfImage for the first frame (page) found in the existing Image.

Remarks

This method adds a new image for each frame (page) found in the existing Image.

AddImage(PdfDocument, Image, PdfColor)

Creates image(s) with the data and properties of specified Image, applies specified mask color to them and adds resulting image(s) to the end of the collection of document images.

public static PdfImage? AddImage(this PdfDocument doc, Image image, PdfColor maskColor)

Parameters

doc PdfDocument

The document.

image Image

The existing Image from which to create PdfImage(s).

maskColor PdfColor

The color that masks transparent areas of the image(s).

Returns

PdfImage

The PdfImage for the first frame (page) found in the existing Image.

Remarks

This method adds a new image for each frame (page) found in the existing Image. Mask color gets applied for all added images.

AddImage(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.

public static PdfImage? AddImage(this PdfDocument doc, Image image, Image mask)

Parameters

doc PdfDocument

The document.

image Image

The existing Image from which to create a PdfImage.

mask Image

The existing Image from which to create the mask for the PdfImage.

Returns

PdfImage

The created PdfImage.

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.