FPDFImageObj_LoadJpegFile method

int FPDFImageObj_LoadJpegFile(
  1. Pointer<FPDF_PAGE> pages,
  2. int count,
  3. FPDF_PAGEOBJECT image_object,
  4. Pointer<FPDF_FILEACCESS> file_access,
)

Load an image from a JPEG image file and then set it into |image_object|.

pages - pointer to the start of all loaded pages, may be NULL. count - number of |pages|, may be 0. image_object - handle to an image object. file_access - file access handler which specifies the JPEG image file.

Returns TRUE 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 |pages| and page count (|count|) to this API to clear the image cache. If the image is not previously shared, or NULL is a valid |pages| value.

Implementation

int FPDFImageObj_LoadJpegFile(
  ffi.Pointer<FPDF_PAGE> pages,
  int count,
  FPDF_PAGEOBJECT image_object,
  ffi.Pointer<FPDF_FILEACCESS> file_access,
) {
  return _FPDFImageObj_LoadJpegFile(pages, count, image_object, file_access);
}