Constructor

VipsImagenew_matrix

Declaration [src]

VipsImage*
vips_image_new_matrix (
  int width,
  int height
)

Description [src]

This convenience function makes an image which is a matrix: a one-band VIPS_FORMAT_DOUBLE image held in memory.

Use VIPS_IMAGE_ADDR(), or VIPS_MATRIX() to address pixels in the image.

Use vips_image_set_double() to set “scale” and “offset”, if required.

Parameters

width

Type: int

Image width.

height

Type: int

Image height.

Return value

Type: VipsImage

The new VipsImage, or NULL on error.

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