lvmsquish(3)

LIBRARY ROUTINE
lvmsquish - Compress columns in map(s) to one column by means of Average, RMS or MAX

LIBRARY CALL
#include "vinclude.h"
int
lvmsquish(image, m_flag, squish_type)
   struct xvimage *image;
   int m_flag;
   int squish_type;

INPUT

*image
    pointer to the image

m_flag
    map flag (map if set)

squish_type
    1 = AVG, 2 = RMS, 3 = MAX

OUTPUT

image
    image with squished map, or image that has been mapped after map squishing.

MODIFICATIONS

DESCRIPTION
lvmsquish compresses the columns in map(s) to one column by means of Average, RMS or MAX. This routine will work on map schemes ONEPERBAND and SHARED. The optional argument -m specifies whether or not to map the data after squishing the map. If mapping is to occur, the input image must have a storage type of BYTE. The resulting image will be the same data type as the map.

The compression is done in one of three ways:

1.  Compute the AVERAGE value for the elements in a map row and update the new 1 column map with that value.

2   Compute the RMS value for the elements in a map row and update the new 1 column map with that value.

3   find the MAXIMUM value of the elements in a map row and update the new 1 column map with that value.

In all cases the element in the first column of the map is updated.

This program is useful for sending images that have been grabbed off the screen to the laser printer.

Variable image is the input image of pointer type struct xvimage. Image is returned after the map(s) have been squished and the image data has been mapped through the map(s) (only if m_flag has been set).

Variable m_flag determines whether or not to map the data after squishing the map (map if set).

Variable squish_type determines which method to squish map(s) by (1 = AVG, 2 = RMS, 3 = MAX).

lvmsquish returns a 1 upon success and a 0 upon failure.

SEE ALSO
vmsquish(1), intro(3), vipl(3), verror(3), vutils(3) lvmapdata(3)

RESTRICTIONS
If the map flag is yes, the input image data storage type must be BYTE.

AUTHOR
Tom sauer

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