### Method

# Vips Image conva

#### Declaration [src]

    int
    vips_conva (
      VipsImage* in,
      VipsImage** out,
      VipsImage* mask,
      ...
    )

#### Description [src]

Perform an approximate integer convolution of `in` with `mask`. This is a low-level operation, see `vips_conv()` for something more convenient.

The output image always has the same `VipsBandFormat` as the input image. Elements of `mask` are converted to integers before convolution.

Larger values for `layers` give more accurate results, but are slower. As `layers` approaches the mask radius, the accuracy will become close to exact convolution and the speed will drop to match. For many large masks, such as Gaussian, `layers` need be only 10% of this value and accuracy will still be good.

Smaller values of `cluster` will give more accurate results, but be slower and use more memory. 10% of the mask radius is a good rule of thumb.

Optional arguments

- `layers`: `gint`, number of layers for approximation
- `cluster`: `gint`, cluster lines closer than this distance

See also

`vips_conv()`.

This method is not directly available to language bindings.

#### Parameters

`out`

  Type: `VipsImage`

  Output image.

  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.

`mask`

  Type: `VipsImage`

  Convolution mask.

  The data is owned by the caller of the method.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.