M_PDFiumSharp_PDFium_FPDFImageObj_LoadJpegFile - ArgusMagnus/PDFiumSharp GitHub Wiki
Load an image from a JPEG image file and then set it into image_object.
Namespace: PDFiumSharp
Assembly: PDFiumSharp (in PDFiumSharp.dll) Version: 1.0.0
C#
public static bool FPDFImageObj_LoadJpegFile(
FPDF_PAGE[] loadedPages,
FPDF_PAGEOBJECT image_object,
Stream stream,
int count = 0,
bool inline = true
)
- loadedPages
- Type: PDFiumSharp.Types.FPDF_PAGE[]
All loaded pages, may benull
. - image_object
- Type: PDFiumSharp.Types.FPDF_PAGEOBJECT
Handle to an image object. - stream
- Type: System.IO.Stream
Stream which provides access to an JPEG image. - count (Optional)
- Type: System.Int32
The number of bytes to read from stream or 0 to read to the end. - inline (Optional)
- Type: System.Boolean
Iftrue
, this function loads the JPEG image inline, so the image content is copied to the file. This allows stream to be closed after this function returns.
Type: Booleantrue
on success.
The image object might already have an associated image, which is shared and cached by the loaded pages. In that case, we need to clear the cached image for all the loaded pages. Pass loadedPages to this API to clear the image cache. If the image is not previously shared, null
is a valid loadedPages value.