### Method

# Vips Image stats

#### Declaration [src]

    int
    vips_stats (
      VipsImage* in,
      VipsImage** out,
      ...
    )

#### Description [src]

Find many image statistics in a single pass through the data. `out` is a one-band `VIPS_FORMAT_DOUBLE` image of at least 10 columns by n + 1 (where n is number of bands in image `in`) rows. Columns are statistics, and are, in order: minimum, maximum, sum, sum of squares, mean, standard deviation, x coordinate of minimum, y coordinate of minimum, x coordinate of maximum, y coordinate of maximum. Later versions of `vips_stats()` may add more columns.

Row 0 has statistics for all bands together, row 1 has stats for band 1, and so on.

If there is more than one maxima or minima, one of them will be chosen at random.

See also

`vips_avg()`, `vips_min()`.

This method is not directly available to language bindings.

#### Parameters

`out`

  Type: `VipsImage`

  Image of statistics.

  The argument will be set by the function.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.