Function

Vipsrawload

Declaration [src]

int
vips_rawload (
  const char* filename,
  VipsImage** out,
  int width,
  int height,
  int bands,
  ...
)

Description [src]

Optional arguments:

  • offset: %guint64, offset in bytes from start of file
  • format: VipsBandFormat, set image format
  • interpretation: VipsInterpretation, set image interpretation

This operation mmaps the file, setting up out so that access to that image will read from the file.

By default, it assumes uchar pixels. Use format to select something else.

The image will be tagged as #VIPS_INTERPRETATION_MULTIBAND. Use interpretation to select something else.

Use vips_byteswap() to reverse the byte ordering if necessary.

See also: vips_image_new_from_file(), vips_copy(), vips_byteswap().

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.
width int
 

Width of image in pixels.

height int
 

Height of image in pixels.

bands int
 

Number of image bands.

...
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.