inv_cmap man page on Tru64

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
Tru64 logo
[printable version]

INV_CMAP(3)							   INV_CMAP(3)

NAME
       inv_cmap - efficiently compute an inverse colormap

SYNOPSIS
       void inv_cmap( colors, colormap, bits, dist_buf, rgbmap )

       int colors, bits;
       unsigned char *colormap[3], *rgbmap;
       unsigned long *dist_buf;

DESCRIPTION
       Inv_cmap	 computes an inverse colormap to translate an RGB color to the
       nearest color in the given colormap.  The arguments are

       colors The number of colors in the input colormap.  Must be  256.

       colormap
	      The input colormap.  The	ith  color  is	(Colormap[0][i],  Col‐
	      ormap[1][i], Colormap[2][i]).

       bits   Controls	the  size  and precision of the inverse colormap.  The
	      resulting colormap will be a cube 2^bits on  a  side,  and  will
	      therefore	 contain 2^(3*bits) entries.  RGB colors must be quan‐
	      tized to bits bits before using the inverse colormap.

       dist_buf
	      Temporary storage used by inv_cmap.  It should contain at	 least
	      2^(3*bits) elements.

       rgbmap The  inverse  colormap.	Should	be  allocated  with  at	 least
	      2^(3*bits) elements.   After  calling  inv_cmap,	an  RGB	 color
	      (r,g,b)  can be mapped to its closest representative in colormap
	      by evaluating
	      #define quantize(p) ((p)>>(8-bits))
	      rgbmap[ (((quantize(r) << bits) | quantize(g)) << bits) |	 quan‐
	      tize(b) ]

       Predicted  performance is O(2^(3*bits)*log(colors)).  The measured per‐
       formance is sublinear (but not as good as log) in the number  of	 input
       colors  and  also in the size of the output inverse colormap. (I.e., it
       goes up more slowly than 2^(3*bits).)

SEE ALSO
       colorquant(3).

AUTHOR
       Spencer W. Thomas

4th Berkeley Distribution	Month DD, YYYY			   INV_CMAP(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Tru64

List of man pages available for Tru64

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net