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.

The loader applies demosaicing and basic processing to produce an RGB or grayscale image suitable for further processing. It attaches XMP and ICC metadata, if present.

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.

Set bit_depth to control the number of bits to decode to. Either 8 or 16, default 8,

Optional arguments

  • bitdepth: gint, number of bits to decode to
  • half_size: gboolean, decode at half-size.

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.