M_PDFiumSharp_PDFium_FPDFImageObj_LoadJpegFile - ArgusMagnus/PDFiumSharp GitHub Wiki

PDFium.FPDFImageObj_LoadJpegFile Method

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

Syntax

C#

public static bool FPDFImageObj_LoadJpegFile(
	FPDF_PAGE[] loadedPages,
	FPDF_PAGEOBJECT image_object,
	Stream stream,
	int count = 0,
	bool inline = true
)

Parameters

 

loadedPages
Type: PDFiumSharp.Types.FPDF_PAGE[]
All loaded pages, may be null.
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
If true, 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.

Return Value

Type: Boolean
true on success.

Remarks

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.

See Also

Reference

PDFium Class
PDFiumSharp Namespace

⚠️ **GitHub.com Fallback** ⚠️