Constructor

VipsImagerawload

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

Type: int

Width of image in pixels.

height

Type: int

Height of image in pixels.

bands

Type: int

Number of image bands.

...

Type: 

NULL-terminated list of optional named arguments.

Return value

Type: int

0 on success, -1 on error.