Method OpenImage
- Namespace
- BitMiracle.Docotic.Pdf.Gdi
- Assembly
- BitMiracle.Docotic.Pdf.Gdi.dll
OpenImage(PdfDocument, Image)
Opens the provided Image data and constructs a collection of its frames (pages).
public static PdfImageFrames OpenImage(this PdfDocument doc, Image image)
Parameters
doc
PdfDocumentThe document
image
ImageThe image to create the collection of frames from.
Returns
- PdfImageFrames
The collection of image frames (pages) created from the provided image.
Remarks
This method creates frames from data in JPEG, BMP, GIF, PNG, and TIFF formats.
Use the created frames to change the compression scheme of an image data before creating an PdfImage from it. There is another example for using selected pages (frames) from a multi-page image.
To create a PdfImage from one or more frames, use the CreateImage(PdfImageFrame) method.
Exceptions
- UnsupportedImageException
The library can not create frames from the provided image.
- ArgumentNullException
image
isnull
.