im_shrink(3)

im_shrink3

Shrink an image

Usage

#include <vips/vips.h>

int im_shrink(in, out, xfactor, yfactor)
IMAGE *in, *out;
double xfactor, yfactor;

int im_resize_linear(in, out, X, Y)
IMAGE *in, *out;
int X, Y;

Overview

im_shrink(3) shrink the input image file by xfactor along the horizontal and yfactor along the vertical direction. The function does not perform subpixel interpolation and therefore the resultant image can present aliasing especially for small x and y factors. Any size image, any non-complex type, any number of bands.

im_resize_linear(3) resizes the image to be X by Y pixels. It is slow, only does bilinear interpolation (and so will be inaccurate for factors greater than two), and uses WIO, so it has a 2GB image size limit and will use large amounts of memory. Use im_shrink(3) in preference if possible.

Return value

The functions returns 0 on success and -1 on error.

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1–4.0
  2. 5.0
  3. 6.0

From libvips-dev 7.20.7-1+b3 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.