Method OpenImage
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
OpenImage(byte[])
Opens the provided image data in byte array format and constructs a collection of its frames (pages).
public PdfImageFrames OpenImage(byte[] imageBytes)
Parameters
imageBytesbyte[]The byte array containing the image file data.
Returns
- PdfImageFrames
The collection of image frames (pages) created from the provided image data.
Remarks
This method creates frames from data in JPEG, BMP, GIF, PNG, TIFF, and JPEG 2000 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 data. Please send us the image data for a review.
- ArgumentNullException
imageBytesisnull.
OpenImage(string)
Opens the specified image file and constructs a collection of its frames (pages).
public PdfImageFrames OpenImage(string imageFilePath)
Parameters
imageFilePathstringThe path to the image file.
Returns
- PdfImageFrames
The collection of image frames (pages) created from the provided image data.
Remarks
This method creates frames from data in JPEG, BMP, GIF, PNG, TIFF, and JPEG 2000 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 data. Please send us the image data for a review.
- ArgumentNullException
imageFilePathisnull.- FileNotFoundException
Thrown if the image file does not exist at the specified path.
OpenImage(Stream)
Opens the provided stream containing image file data and constructs a collection of its frames (pages).
public PdfImageFrames OpenImage(Stream imageStream)
Parameters
imageStreamStreamThe stream containing the image file data.
Returns
- PdfImageFrames
The collection of image frames (pages) created from the provided image data.
Remarks
This method creates frames from data in JPEG, BMP, GIF, PNG, TIFF, and JPEG 2000 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 data. Please send us the image data for a review.
- ArgumentNullException
imageStreamisnull.