---
name: "im_rightshift_size"
section: "3"
platform: "linux"
package: "libvips-dev"
version: "7.20.7-1+b3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/im_rightshift_size"
---

# im\_rightshift\_size(3)

Decrease size by a power-of-two factor

## NAME

 im\_rightshift\_size - Decrease size by a power-of-two factor

## SYNOPSIS

```
#include <vips/vips.h>

int im_rightshift_size( IMAGE *in, IMAGE *out, int xshift, int yshift, int band_fmt );
```

## DESCRIPTION

**[im\_rightshift\_size(3)](/im_rightshift_size/3.md)** decreases the size of an integer type image by a power-of-two factor, very quickly, by summing the values of adjacent pixels.  The sum is shifted to produce output of the specified band format.   *xshift* and *yshift* are positive and give the base-two logarithms of the scale factors.

If the input image is a signed type, then  *band\_fmt* must be one of IM\_BANDFMT\_CHAR, IM\_BANDFMT\_SHORT or IM\_BANDFMT\_INT.  If it is an unsigned type, then *band\_fmt* must be one of IM\_BANDFMT\_UCHAR, IM\_BANDFMT\_USHORT or IM\_BANDFMT\_UINT.

## RETURN VALUE

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

## SEE ALSO

[im\_affine(3)](/im_affine/3.md)

## COPYRIGHT

Copyright 2006, Tom Vajzovic.

## AUTHOR

Tom Vajzovic
