### Method

# Vips Image avg

#### Declaration [src]

    int
    vips_avg (
      VipsImage* in,
      double* out,
      ...
    )

#### Description [src]

This operation finds the average value in an image. It operates on all bands of the input image: use `vips_stats()` if you need to calculate an average for each band. For complex images, return the average modulus.

See also

`vips_stats()`, `vips_bandmean()`, `vips_deviate()`, `vips_rank()`.

This method is not directly available to language bindings.

#### Parameters

`out`

  Type: `double*`

  Output pixel average.

  The argument will be set by the function.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.