Constructor

VipsImagenew_from_file_raw

Declaration [src]

VipsImage*
vips_image_new_from_file_raw (
  const char* filename,
  int xsize,
  int ysize,
  int bands,
  guint64 offset
)

Description [src]

This function maps the named file and returns a VipsImage you can use to read it.

It returns an 8-bit image with bands bands. If the image is not 8-bit, use vips_copy() to transform the descriptor after loading it.

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

Parameters

filename const char*
 

Filename to open.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
xsize int
 

Image width.

ysize int
 

Image height.

bands int
 

Image bands (or bytes per pixel)

offset guint64
 

Bytes to skip at start of file.

Return value

Returns: VipsImage
 

The new VipsImage, or NULL on error.

 The caller of the function takes ownership of the data, and is responsible for freeing it.