Method

VipsImagegetpoint

Declaration [src]

int
vips_getpoint (
  VipsImage* in,
  double** vector,
  int* n,
  int x,
  int y,
  ...
)

Description [src]

Reads a single pixel on an image.

The pixel values are returned in vector, the length of the array in n. You must free the array with g_free() when you are done with it.

The result array has an element for each band. If unpack_complex is set, pixels in complex images are returned as double-length arrays.

This operation is slow. If you want to read many points, use vips_image_write_to_memory().

::: seealso vips_draw_point(), vips_image_write_to_memory().

Parameters

vector An array of double*
 

Output pixel value here.

 The argument will be set by the function.
 The length of the array is specified in the n argument.
 The instance takes ownership of the data, and is responsible for freeing it.
n int*
 

Length of output vector.

 The argument will be set by the function.
 The instance takes ownership of the data, and is responsible for freeing it.
x int
 

Position to read.

y int
 

Position to read.

... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, or -1 on error.