Vips – 8.0: Operator index > By section > Resample
Description: Reference for Vips-8.0: Operator index > By section > Resample

#### Operator index > By section > Resample [src]

These operations build on each other in a set of layers.

First, `vips_affine()` applies an affine transform to an image. This is any sort of 2D transform which preserves straight lines; so any combination of stretch, sheer, rotate and translate. You supply an interpolator for it to use to generate pixels, see `vips_interpolate_new()`. It will not produce good results for very large shrinks: you’ll see aliasing.

`vips_reduce()` is like `vips_affine()`, but it can only shrink images, it can’t enlarge, rotate, or skew. It’s very fast and uses an adaptive kernel for interpolation.

`vips_shrink()` is a fast block shrinker. It can quickly reduce images by large integer factors. It will give poor results for small size reductions: again, you’ll see aliasing.

Next, `vips_resize()` specialises in the common task of image reduce and enlarge. It strings together combinations of `vips_shrink()`, `vips_reduce()`, `vips_affine()` and others to implement a general, high-quality image resizer.

Finally, `vips_thumbnail()` combines load and resize in one operation, and adds colour management and correct handling of alpha transparency. Because load and resize happen together, it can exploit tricks like JPEG and TIFF shrink-on-load, giving a (potentially) huge speedup. `vips_thumbnail_image()` is only there for emergencies, don’t use it unless you really have to.

As a separate thing, `vips_mapim()` can apply arbitrary 2D image transforms to an image.

## Classes

- `VipsInterpolate`

## Callbacks

- `VipsInterpolateMethod`

## Functions

- `vips_shrink()`
- `vips_shrinkh()`
- `vips_shrinkv()`
- `vips_reduce()`
- `vips_reduceh()`
- `vips_reducev()`
- `vips_thumbnail()`
- `vips_thumbnail_buffer()`
- `vips_thumbnail_image()`
- `vips_thumbnail_source()`
- `vips_similarity()`
- `vips_rotate()`
- `vips_affine()`
- `vips_resize()`
- `vips_mapim()`
- `vips_quadratic()`
- `vips_interpolate()`
- `vips_interpolate_new()`
- `vips_interpolate_bilinear_static()`
- `vips_interpolate_nearest_static()`
- `vips_interpolate_get_method()`
- `vips_interpolate_get_window_offset()`
- `vips_interpolate_get_window_size()`

## Constants

- `VIPS_INTERPOLATE_SCALE`
- `VIPS_INTERPOLATE_SHIFT`
- `VIPS_TRANSFORM_SCALE`
- `VIPS_TRANSFORM_SHIFT`

## Enumerations

- `VipsKernel`
- `VipsSize`