Constructor

VipsImagerawload

Declaration [src]

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

Description [src]

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 VipsInterpretation. Use interpretation to select something else.

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

::: tip “Optional arguments” * offset: guint64, offset in bytes from start of file * format: VipsBandFormat, set image format * interpretation: VipsInterpretation, set image interpretation

::: seealso vips_image_new_from_file(), vips_copy(), vips_byteswap().

Parameters

filename const char*
 

File to load.

 The data is owned by the caller of the function.
 The string 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.

... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.