Vips.Image.getpoint

### Method

# Vips Imagegetpoint

#### 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()`.

See also

`vips_draw_point()`, `vips_image_write_to_memory()`.

This method is not directly available to language bindings.

#### Parameters

`vector`

  Type: 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 caller of the method takes ownership of the returned data, and is responsible for freeing it.

`n`

  Type: `int*`

  Length of output vector.

  The argument will be set by the function.

`x`

  Type: `int`

  Position to read.

`y`

  Type: `int`

  Position to read.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, or -1 on error.