PdfDocumentGdiExtensions.OpenImage Method

Opens the image and constructs a collection of its frames (pages).

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

Syntax

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

Parameters

doc
Type: BitMiracle.Docotic.Pdf.PdfDocument
The document.
image
Type: System.Drawing.Image
The image to open.

Return Value

Type: PdfImageFrames
The collection of image frames (pages) or null if image format is unsupported.

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

This method does not load image data and does not add images to the collection of document images.

This method is useful if you want to add only some of the image frames (pages) to document or if you want to recompress image frames before adding them to document.

Please use one of the AddImage() methods to add a frame from collection of frames to the collection of document images.

See Also