---
name: "im_invert"
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_invert"
---

# im\_invert(3)

inverts an image pointed by an image descriptor.

## NAME

im\_invert - inverts an image pointed by an image descriptor.

## SYNOPSIS

**#include \<vips/vips.h\>**

**int im\_invert(in, out)**\
 **IMAGE \*in, \*out;**

## DESCRIPTION

**im\_invert** inverts the image held by image descriptor in and writes the result on the  image descriptor out.  The function works on FMTUCHAR images only.   The result at point x of the input image is 255-x at the output image. Input can have any no of channels.\
\
   This is not a generally useful program -- it is included as an example of a very simple new-style IO function. Feel the power of the source, Luke!

## RETURN VALUE

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

## SEE ALSO

[im\_add(3)](/im_add/3.md), [im\_lintra(3)](/im_lintra/3.md), [im\_multiply(3)](/im_multiply/3.md).

## AUTHOR

J. Cupitt - 21/7/93
