### Constructor

# Vips Image heifload

#### Declaration [src]

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

#### Description [src]

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`.

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

See also

`vips_image_new_from_file()`.

This constructor is not directly available to language bindings.

#### Parameters

`filename`

  Type: `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`

  Type: `VipsImage`

  Decompressed image.

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

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.