lvshrink(3)

LIBRARY ROUTINE
lvshrink - Shrink an image by skipping pixels (subsampling)

LIBRARY CALL
#include "vinclude.h"
int
lvshrink(image,scale)
struct xvimage *image;
int  scale;

INPUT

image
    pointer to xvimage structure to be processed

scale
    size reduction factor (integer), must be postitive, non-zero

OUTPUT

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

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS

Add multiband processing, Mar/28/91, Shirley Lee

20-May-91 Scott Wilson - corrected size calculation

Mark Young and John Rasure fixed malloc problem for shrinking bit images with an odd scale factor. Fri Nov 15 01:15:32 MST 1991

DESCRIPTION
lvshrink decreases the size of an image by skipping to every s'th pixel where s is the scale argument. The resultant image will be 1/s the size of the original image.

The scale factor must be a positive, non-zero number.

The output data type is the same asn the input data type.

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
vshrink(1), intro(3), vipl(3), verror(3), vutils(3) lvexpand(1), lvresize(1)

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

AUTHOR
Scott Wilson

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