Constructor

VipsImagedcrawload

Declaration [src]

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

Description [src]

Read a RAW camera file using LibRaw.

This loader supports the most RAW formats, including ARW, CR2, CR3, CRW, DNG, NEF, NRW, ORF, PEF, RAF, RAW, RW2, SRW, X3F, and many others.

Images are demosaiced and loaded as 16-bit unsigned linear values with Rec.2020 primaries.

Set half_size to disable demosaicing and load at half size.

Set auto_brightness to get libraw to search for the brightest point in the image and scale to that. By default, this operation loads images with the full sensor range exposed.

Use bitdepth to set the bitdepth to load at. The default is 16, the full sensor values.

The operation sets CICP metadata and attaches an ICC profile. Use vips_CICP2scRGB() or vips_icc_import() to get a colorimetric image.

The loader will search for embedded, JPEG-encoded thumbnail and preview images, attaching them as jpeg-thumbnail-data and jpeg-preview-data. Set half_size to decode at half-size. This can be much faster, though of course the image is smaller.

Optional arguments

  • bitdepth: gint, number of bits to decode to
  • half_size: gboolean, decode at half-size
  • auto_brightness: gboolean, apply a histogram based auto-brightness

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

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