ilMap(3X)
NAME
ilMap() − remap the pixels of a pipe image
SYNOPSIS
ilBool
ilMap (
ilPipe pipe,
ilClientImage mapImage);
DESCRIPTION
ilMap() remaps the pixels of a pipe image by using each pipe image pixel as an index into the pixels of the mapImage, so that the mapImage functions as a look-up table. This function can be used to adjust image attributes such as brightness, contrast, and gamma mapping. It cannot be used on IL_BITONAL images.
pipe identifies a pipe created by ilCreatePipe().
mapImage identifies an ilClientImage that is used as a lookup table. The image must be uncompressed, have a width of 256, a height of 1, and contain the same number of samples per pixel as the pipe image. Each sample is 8 bits. Each pixel of the pipe image indexes into the pixel in mapImage using its pipe image value (0 to 255) as the x coordinate. For example, pixels with value 0 take on the value of the pixel in mapImage at position 0.
RETURN VALUE
Upon successful completion, ilMap() returns TRUE.
ERRORS
If the call fails, context->error receives a non-zero error code.
EXAMPLE
The following example remaps the pixels of the image in pipe, using the client image Gamma as the lookup table.
ilPipe pipe;
ilClientImage Gamma;
.
.
.
if (!ilMap (pipe, Gamma)) return (pipe->context->error);
AUTHOR
ilMap() was developed by HP.
SEE ALSO
ilCreatePipe(3X), ilConvert(3X), ilCrop(3X), ilMirror(3X), ilScale(3X), ilRotatePipe(3X).
Using the Image Developer’s Kit.
Hewlett-Packard Company — Image Library: February, 1995