Constructor

VipsImagenew_from_image

Declaration [src]

VipsImage*
vips_image_new_from_image (
  VipsImage* image,
  const double* c,
  int n
)

Description [src]

Creates a new image with width, height, format, interpretation, resolution and offset taken from image, but with number of bands taken from n and the value of each band element set from c.

Parameters

image

Type: VipsImage

Image to copy.

The data is owned by the caller of the function.
c

Type: An array of double

Array of constants.

The length of the array is specified in the n argument.
The data is owned by the caller of the function.
n

Type: int

Number of constants.

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.