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.

See also: vips_image_new_matrixv()

Parameters

width int
 

Image width.

height int
 

Image height.

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.