mediaLib Library Functions mlibImageColorTrue2Index(3MLIB)
NAME
mlibImageColorTrue2Index - true color to indexed color
using nearest matched LUT entries
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageColorTrue2Index(mlibimage *dst,
const mlibimage *src, const void *colormap);
DESCRIPTION
The mlibImageColorTrue2Index() function converts a true
color image to a pseudo color image with the method of find-
ing the nearest matched lookup table entry for each pixel.
The source image can be an MLIBYTE or MLIBSHORT image
with three or four channels. The destination must be a
single-channel MLIBYTE or MLIBSHORT image.
The last parameter, colormap, is an internal data structure
(which includes the lookup table) for inverse color mapping.
Create it by calling the mlibImageColorTrue2IndexInit()
function.
PARAMETERS
The function takes the following arguments:
dst Pointer to destination or destination image.
src Pointer to source or source image.
colormap Internal data structure for inverse color map-
ping.
RETURN VALUES
The function returns MLIBSUCES if successful. Otherwise
it returns MLIBFAILURE.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibImageColorTrue2Index(3MLIB)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibImageColorErrorDiffusion3x3(3MLIB),
mlibImageColorOrderedDither8x8(3MLIB),
mlibImageColorTrue2IndexFree(3MLIB),
mlibImageColorTrue2IndexInit(3MLIB), attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 2
|