lvblend(3)

LIBRARY ROUTINE
lvblend - Blend two images using X*image1 + (1-X)*image2 where X is the blend ratio.

LIBRARY CALL
#include "vinclude.h"
int
lvblend(img1,img2,img3,x,mflg)
struct xvimage *img1, *img2,*img3;
float x;
int mflg;

INPUT

    img1 - pointer to the first input image structure
    img2 - pointer to the second input image structure
    img3 - optional pointer to the blend image structure
    x - optional blend ratio
    mflg - if 1 specifies the use of a blending image, if 0 specifies
           the use of a blend ratio

    either x or mflg must be specified, and if mflg is true, then img3 must be a valid image pointer. img3 must be VFF_TYP_FLOAT and must have the same number of rows and columns as img1 and img2.

    If both a blend mask image and a blend ratio are specified, then the blend mask image is dominant, and the ratio is ignored.

OUTPUT

    img1 - blended image attached to img1 pointer

MODIFICATIONS
28-Dec-89 Added blend image support. Scott Wilson

DESCRIPTION
lvblend forms a composite image by adding X*(img1 data) to (1-X)*(img2 data). The result is stored back in the img1 data area.

If mflg is nonzero, then the image pointed to by img3 is used to determine the blend ratio on a point by point basis. if used, img3 must be of type FLOAT and must have the same number of rows and columns as the -i1 and -i2 images.

The -i1 and -i2 images must be of the same data type and size.

If mflg is nonzero, the blend ratio in X is ignored.

lvblend returns 1 upon success and 0 on failure.

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

RESTRICTIONS
lvblend does not work on VFF_TYP_DOUBLE and multi band images.

AUTHOR
Scott Wilson

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