lvresize(3)

LIBRARY ROUTINE
lvresize - Magnify or reduce an image using bilinear interpolation

LIBRARY CALL
#include "vinclude.h"
int
lvresize(image,hmag,vmag,xc,yc)
struct xvimage *image;
float  hmag,vmag;
float  xc,yc;

INPUT

image
    pointer to xvimage structure to be processed

hmag
    magnification factor in the horizontal (X) direction (float)

vmag
    magnification factor in the vertical (Y) direction (float)

xc  X coordinate of center of action (float)

yc  Y coordinate of center of action (float)

OUTPUT

image
    holds the result of the resize operation. The output data type is the same as the input data type.

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS
John Rasure
Scott Wilson 18-Sep-90 Added multiband support

DESCRIPTION
lvresize is used to magnify or reduce an image by using bilinear interpolation. The resultant image is the same size and type as the original, but the pixels in the input image are magnified or reduced in the output image.

If the input image is reduced (magnification factor < 1.0) then unknown pixels are set to zero.

If the input image is magnified (magnification factor > 1.0) then input pixels that would be mapped outside of the output image are lost.

The magnification factor cannot be zero.

The magnification or reduction is done about a center point that can be specified to be anywhere in the X-Y plane (even outside the image). The correct way to think about this is by analogy to a magnifying glass where you place the magnifying glass over the point of interest and then choose the lens to get the magnification you want.

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

SEE ALSO
vresize(1), intro(3), vipl(3), verror(3), vutils(3) lvwarp(1), lvshrink(1), lvexpand(1), lvrotate(1)

RESTRICTIONS
lvresize does not work on COMPLEX data types. lvresize does not work on explicit location data.

AUTHOR
Scott Wilson

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