FPDFImageObj_GetIccProfileDataDecoded function

  1. @Native<FPDF_BOOL Function(FPDF_PAGEOBJECT, FPDF_PAGE, Pointer<Uint8>, Size, Pointer<Size>)>(FPDF_PAGEOBJECT, FPDF_PAGE, ffi.Pointer<ffi.Uint8>, ffi.Size, ffi.Pointer<ffi.Size>)>()
int FPDFImageObj_GetIccProfileDataDecoded(
  1. FPDF_PAGEOBJECT image_object,
  2. FPDF_PAGE page,
  3. Pointer<Uint8> buffer,
  4. int buflen,
  5. Pointer<Size> out_buflen,
)

Experimental API. Get ICC profile decoded data of |image_object|. If the |image_object| is not an image object or if it does not have an image, then the return value will be false. It also returns false if the |image_object| has no ICC profile. |buffer| is only modified if ICC profile exists and |buflen| is longer than the length of the ICC profile decoded data.

image_object - handle to an image object; must not be NULL. page - handle to the page containing |image_object|; must not be NULL. Required for retrieving the image's colorspace. buffer - Buffer to receive ICC profile data; may be NULL if querying required size via |out_buflen|. buflen - Length of the buffer in bytes. Ignored if |buffer| is NULL. out_buflen - Pointer to receive the ICC profile data size in bytes; must not be NULL. Will be set if this API returns true.

Returns true if |out_buflen| is not null and an ICC profile exists for the given |image_object|.

Implementation

@ffi.Native<
  FPDF_BOOL Function(
    FPDF_PAGEOBJECT,
    FPDF_PAGE,
    ffi.Pointer<ffi.Uint8>,
    ffi.Size,
    ffi.Pointer<ffi.Size>,
  )
>()
external int FPDFImageObj_GetIccProfileDataDecoded(
  FPDF_PAGEOBJECT image_object,
  FPDF_PAGE page,
  ffi.Pointer<ffi.Uint8> buffer,
  int buflen,
  ffi.Pointer<ffi.Size> out_buflen,
);