int lkmsquish(kobject in_obj, int map_flag, int type, kobject out_obj)
lkmsquish is very happy to operate on simple 3-column maps, such as would be encountered when processing a color image in any of the standard coordinate systems (ntscRGB, etc). However, lkmsquish is not limited to 3 column maps - it will operate on maps with any number of cloumns.
The conversion from multiple columns to a single column is done by computing a grey level for each row of the map, one at a time. For type=1, the grey level for a row is the average of the columns in the row. For type=2, the grey level is the RMS value of the columns in the row. For type=3, the grey level is the maximum value found in the colums of the row. Clearly, these schemes are not optimal in any sense, but one of them will usually give an acceptable result.
Ordinarily (map_flag=0), the map is the only part of the input object that is modified. The value data is not touched; it still points to various rows in the map just as before the compression. If map_flag=1, the value data is pulled thru the map and the map segment itself is removed. If mask data is present, then this operation proceeds as described in the man page for kmapdata(1).
none
none
$DATAMANIP/objects/library/kdatamanip/src/lkmsquish.c