lvreplace(3)

LIBRARY ROUTINE
lvreplace - Replace pixels in an image with pixels from another image using a mask.

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

INPUT

    1. img1 -- first xvimage structure
    2. img2 -- second xvimage structure
    3. img3 -- mask 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.

    lvreplace returns a zero upon failure.

MODIFICATIONS
Marcelo Teran, John Rasure

DESCRIPTION
lvreplace replaces pixels of the first input image with pixels of the second input image according to a mask.
img3   output(img1)
-------------
~0    img2
 0    img1

An output pixel receives the value of the first input image if the corresponding mask image pixel is zero. The output pixel gets the value of the corresponding pixel in the second image if the mask image pixel value is non-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.

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

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

RESTRICTIONS
lvreplace will not operate on or Bit data storage type images.

AUTHOR
Scott Wilson

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