Table of Contents

## Name

im_andimage, im_andconst, im_and_vec, im_orimage, im_orconst, im_or_vec, im_eorimage, im_eorconst, im_eor_vec - boolean operations on unsigned char images

## Synopsis

#include <vips/vips.h>

int im_andimage(a, b, out)
IMAGE *a, *b, *out;

int im_andconst(a, out, c)
IMAGE *a, *out;
double c;

int im_and_vec(a, out, n, v)
IMAGE *a, *out;
int n;
double *v;

int im_orimage(a, b, out)
IMAGE *a, *b, *out;

int im_orconst(a, out, c)
IMAGE *a, *out;
double c;

int im_or_vec(a, out, n, v)
IMAGE *a, *out;
int n;
double *v;

int im_eorimage(a, b, out)
IMAGE *a, *b, *out;

int im_eorconst(a, out, c)
IMAGE *a, *out;
double c;

int im_eor_vec(a, out, n, v)
IMAGE *a, *out;
int n;
double *v;

## Description

Perform bitwise logical operations on integer images.

im_andimage(3) performs bitwise and between corresponding pixels in a and b, writing the result to out. Both images must be the same size and have the same number of bands. They can have any integer type.

im_andconst(3) performs bitwise and between pixels in a and a single constant value. im_and_vec(3) lets you specify n constants, one per band.

im_orimage(3) and im_eorimage(3) behave similarly. Use im_eorconst( in, out, -1 ) or im_invert(3) as a not operator.

## Return Value

All functions return 0 on success and -1 on error.

## See Also

im_ifthenelse(3) , im_equal(3) .

## Copyright

National Gallery, 1992

## Author

J. Cupitt

Table of Contents

- Name
- Synopsis
- Description
- Return Value
- See Also
- Copyright
- Author