Method AddImage
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
AddImage(byte[])
Adds new image(s) with the data and properties read from the buffer with image bytes to the end of the collection of document images.
public PdfImage? AddImage(byte[] imageBuffer)
Parameters
Returns
Remarks
This method adds a new image for each frame (page) read from the buffer with image bytes.
The Images section describes ways to add images to PDF documents.
AddImage(byte[], PdfColor?)
Creates image(s) with the data and properties read from the buffer with image bytes, applies specified mask color to them and adds resulting image(s) to the end of the collection of document images.
public PdfImage? AddImage(byte[] imageBuffer, PdfColor? maskColor)
Parameters
imageBuffer
byte[]The buffer with the image bytes from which to create PdfImage(s).
maskColor
PdfColorThe color that masks transparent areas of the image.
Returns
Remarks
This method adds a new image for each frame (page) read from the buffer with image bytes. Mask color gets applied for all added images.
The Images section describes ways to add images to PDF documents.
AddImage(byte[], byte[])
Creates a new image with the data and properties read from the buffer with image bytes, applies mask constructed from the buffer with mask image bytes to it and adds resulting image to the end of the collection of document images.
public PdfImage? AddImage(byte[] imageBuffer, byte[] maskBuffer)
Parameters
imageBuffer
byte[]The buffer with the image bytes from which to create a PdfImage.
maskBuffer
byte[]The buffer with the mask image bytes from which to create the mask for the PdfImage.
Returns
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.
The Images section describes ways to add images to PDF documents.
AddImage(string)
Adds new image(s) with the data and properties read from the file with specified name to the end of the collection of document images.
public PdfImage? AddImage(string fileName)
Parameters
Returns
Remarks
This method adds a new image for each frame (page) read from the file with specified name.
The Images section describes ways to add images to PDF documents.
AddImage(string, PdfColor)
Creates image(s) with the data and properties read from the file with specified name, applies specified mask color to them and adds resulting image(s) to the end of the collection of document images.
public PdfImage? AddImage(string fileName, PdfColor maskColor)
Parameters
fileName
stringName of the file from which to create PdfImage(s).
maskColor
PdfColorThe color that masks transparent areas of the image.
Returns
Remarks
This method adds a new image for each frame (page) read from the file with specified name. Mask color gets applied for all added images.
The Images section describes ways to add images to PDF documents.
AddImage(string, string)
Creates a new image with the data and properties read from the file with specified name, applies mask read from another file with specified name to it and adds resulting image to the end of the collection of document images.
public PdfImage? AddImage(string fileName, string maskFileName)
Parameters
fileName
stringName of the file from which to create a PdfImage.
maskFileName
stringName of the file from which to create the mask for the PdfImage.
Returns
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.
The Images section describes ways to add images to PDF documents.
AddImage(Stream)
Adds new image(s) with the data and properties read from the specified stream to the end of the collection of document images.
public PdfImage? AddImage(Stream stream)
Parameters
stream
StreamThe stream with image data.
Returns
Remarks
This method adds a new image for each frame (page) read from the stream.
The Images section describes ways to add images to PDF documents.
AddImage(Stream, PdfColor)
Creates image(s) with the data and properties read from the specified stream, applies specified mask color to them and adds resulting image(s) to the end of the collection of document images.
public PdfImage? AddImage(Stream stream, PdfColor maskColor)
Parameters
stream
StreamThe stream with image data.
maskColor
PdfColorThe color that masks transparent areas of the image.
Returns
Remarks
This method adds a new image for each frame (page) read from the stream. Mask color gets applied for all added images.
The Images section describes ways to add images to PDF documents.
AddImage(Stream, Stream)
Creates a new image with the data and properties read from the specified stream, applies mask read from another stream to it and adds resulting image to the end of the collection of document images.
public PdfImage? AddImage(Stream stream, Stream maskStream)
Parameters
Returns
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.
The Images section describes ways to add images to PDF documents.
AddImage(PdfImageFrame)
Creates a new image from specified PdfImageFrame and adds it to the end of the collection of document images.
public PdfImage AddImage(PdfImageFrame frame)
Parameters
frame
PdfImageFrameThe image frame to use.
Returns
Remarks
This method will load image frame data, apply all specified transformations and create a new PdfImage. The created PdfImage will be added to the collection of document images.
If an image frame specified by the frame
parameter was
already used to create an PdfImage then this method will throw
an exception.
The Images section describes ways to add images to PDF documents.