Function

Vipsgifload

Declaration [src]

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

Description [src]

Optional arguments:

  • page: %gint, page (frame) to read
  • n: %gint, load this many pages
  • fail_on: VipsFailOn, types of read error to fail on

Read a GIF file into a libvips image.

Use page to select a page to render, numbering from zero.

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 change page layout.

Use fail_on to set the type of error that will cause load to fail. By default, loaders are permissive, that is, #VIPS_FAIL_ON_NONE.

The output image is RGBA for GIFs containing transparent elements, RGB otherwise.

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
 

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