lvand(3)

LIBRARY ROUTINE
lvand - Logically AND two images pixel by pixel.

LIBRARY CALL
#include "vinclude.h"
int
lvand(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.

    lvand returns 1 upon success and 0 on failure.

MODIFICATIONS
Marcelo Teran, John Rasure

DESCRIPTION
Logically AND two images pixel by pixel.
img1  img2  output
------------------
~0    ~0    img1
~0     0    0
 0    ~0    0
 0     0    0
For each corresponding pair of pixels from the input images, the corresponding output pixel is assigned the value of the first input image if both input pixels are not zero. If one of the pixels is zero, the output pixel will be zero.

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.

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

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

RESTRICTIONS
lvand will not operate Bit data storage types.

AUTHOR
Scott Wilson, Mark Young

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