lvxor(3)

LIBRARY ROUTINE
lvxor - Exclusive OR two images pixel by pixel.

LIBRARY CALL
#include "vinclude.h"
int
lvxor(img1,img2)
struct xvimage *img1, *img2;

INPUT

    1. img1 -- first xvimage structure
    2. img2 -- second xvimage structure

    The inputs must be of the same data type and size.

OUTPUT

    1. img1 -- output xvimage structure

    img1 is used for both the input xvimage structure and the output result xvimage structure. This is done to save space, but you must be careful not to overwrite important data.

    lvxor returns one upon success and zero on failure.

MODIFICATIONS
Marcelo Teran, John Rasure

DESCRIPTION
Exclusive OR two images pixel by pixel.

img1  img2  output
------------------
~0    ~0    0
~0     0    img1
 0    ~0    img2
 0     0    img1=0

If the input image pixels are either both zero or both nonzero, then the corresponding output pixel is set to zero. Otherwise, the output pixel is assinged the value of nonzero input pixel.

The inputs must be of the same data type and size.

img1 is used for both the input xvimage structure and the output result xvimage structure. This is done to save space, but you must be careful not to overwrite important data.

The output image data type is the same as the input data type.

lvxor returns a value of one upon success and a zero on failure.

SEE ALSO
vxor(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
lvxor will not operate on Bit data storage type images.

AUTHOR
Scott Wilson

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.