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.

See also: vips_image_new_from_image1()

Parameters

image VipsImage
 

Image to copy.

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

Number of constants.

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.