Vips.Image.shrink

### Method

# Vips Imageshrink

#### Declaration [src]

    int
    vips_shrink (
      VipsImage* in,
      VipsImage** out,
      double hshrink,
      double vshrink,
      ...
    )

#### Description [src]

Shrink `in` by a pair of factors with a simple box filter.

For non-integer factors, `vips_shrink()` will first shrink by the integer part with a box filter, then use `vips_reduce()` to shrink by the remaining fractional part.

This is a very low-level operation: see `vips_resize()` for a more convenient way to resize images.

This operation does not change xres or yres. The image resolution needs to be updated by the application.

Optional arguments

- `ceil`: `gboolean`, round-up output dimensions

See also

`vips_resize()`, `vips_reduce()`.

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.

`hshrink`

  Type: `double`

  Horizontal shrink.

`vshrink`

  Type: `double`

  Vertical shrink.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.