im_shrink(3) shrink an image


#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;


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.


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