Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_lookup_create(3)

xil_squeeze_range(3)

xil_lookup_convert(3)

NAME

xil_lookup_convert − calculate a conversion lookup table between a source and destination lookup table

SYNOPSIS

#include <xil/xil.h>

XilLookup xil_lookup_convert ( XilLookup lut1,

XilLookup lut2);

DESCRIPTION

This function calculates a lookup table that converts between the two lookup tables lut1 and lut2.  The resulting lookup table’s input data type will be the input data type of lut1, and its output data type will be the input data type of lut2.  The lookup table’s offset and number of entries are the same as those for lut1.  Index N of the resulting lookup table contains the index of the nearest color in lut2 to the color at index N in lut1.  Nearest color is determined by Euclidean distance.  Source and destination lookup tables must have the same input data types, output data types, and number of bands. 

This function can be useful when you have an image with a lookup table (and colormap) that contains a relatively small number of values over a wide range.  You would first compress the values in the lookup table into a smaller range by using xil_squeeze_range(3).  Then, to create a colormap that matched your newly compressed lookup table, you would use xil_lookup_convert().

RETURN VALUES

Returns NULL; Function fails. 

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

Calculate a lookup table to convert between two lookup tables:

XilLookup lut1, lut2, lut3;
lut3 = xil_lookup_convert(lut1, lut2);

NOTES

This function cannot be used on combined lookup tables. 

SEE ALSO

xil_lookup_create(3), xil_squeeze_range(3). 

SunOS 5.6  —  Last change: 29 March 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026