Click or drag to resize

PdfiumFPDFImageObj_LoadJpegFile Method

Load Image from a JPEG image file and then set it to an image object.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static IntPtr FPDFImageObj_LoadJpegFile(
	IntPtr pages,
	int nCount,
	IntPtr image_object,
	FPDF_FILEACCESS fileAccess
)

Parameters

pages  IntPtr
Pointers to the start of all loaded pages, could be IntPtr.Zero.
nCount  Int32
Number of pages, could be 0.
image_object  IntPtr
Handle to image object returned by FPDFPageObj_NewImgeObj(IntPtr).
fileAccess  FPDF_FILEACCESS
The custom file access handler, which specifies the JPEG image file.

Return Value

IntPtr
Jpeg file handle if successful, IntPtr.Zero otherwise.
Remarks
The image object might already has an associated image, which is shared and cached by the loaded pages, In this case, we need to clear the cache of image for all the loaded pages. Pass pages and count to this API to clear the image cache. The image must be destroyed by calling FPDFImageObj_DestroyJpegFile(IntPtr)
See Also