Vips.Image.magickload
Description: Reference for Vips.Image.magickload

### Constructor

# Vips Imagemagickload

#### Declaration [src]

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

#### Description [src]

Read in an image using libMagick, the ImageMagick library.

This library can read more than 80 file formats, including BMP, EPS, DICOM and many others. The reader can handle any ImageMagick image, including the float and double formats. It will work with any quantum size, including HDR. Any metadata attached to the libMagick image is copied on to the VIPS image.

The reader should also work with most versions of GraphicsMagick. See the `-Dmagick-package` configure option.

The file format is usually guessed from the filename suffix, or sniffed from the file contents.

Normally it will only load the first image in a many-image sequence (such as a GIF or a PDF). Use `page` and `n` to set the start page and number of pages to load. Set `n` to -1 to load all pages from `page` onwards.

`density` is “WxH” in DPI, e.g. “600x300” or “600” (default is “72x72”). See the density docs on the imagemagick website.

Optional arguments

- `page`: `gint`, load from this page
- `n`: `gint`, load this many pages
- `density`: `gchararray`, canvas resolution for rendering vector formats like SVG

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.