im_andimage(3) im_or_vec,

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.

COPYRIGHT

National Gallery, 1992

AUTHOR

J. Cupitt