Function

Vipsheifload

Declaration [src]

int
vips_heifload (
  const char* filename,
  VipsImage** out,
  ...
)

Description [src]

Optional arguments:

  • page: %gint, page (top-level image number) to read
  • n: %gint, load this many pages
  • thumbnail: %gboolean, fetch thumbnail instead of image
  • unlimited: %gboolean, remove all denial of service limits

Read a HEIF image file into a VIPS image.

Use page to select a page to render, numbering from zero. If neither n nor page are set, page defaults to the primary page, otherwise to 0.

Use n to select the number of pages to render. The default is 1. Pages are rendered in a vertical column. Set to -1 to mean “until the end of the document”. Use vips_grid() to reorganise pages.

HEIF images have a primary image. The metadata item heif-primary gives the page number of the primary.

If thumbnail is TRUE, then fetch a stored thumbnail rather than the image.

By default, input image dimensions are limited to 16384x16384. If unlimited is TRUE, this increases to the maximum of 65535x65535.

The bitdepth of the heic image is recorded in the metadata item heif-bitdepth.

See also: vips_image_new_from_file().

This function is not directly available to language bindings

Parameters

filename const char*
 

File to load.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
out VipsImage
 

Decompressed image.

 The argument will be set by the function.
 The called function takes ownership of the data, and is responsible for freeing it.
...
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.