Submitted by Anonymous on Mon, 12/23/2002 - 16:01.
I`m trying to modify some old SW to work on newer systems that have 24-bit visuals. The SW calls XQueryColors() to get the RGB color values for each pixel value in the colormap.
With 24-bit visuals, the RBG values returned from XQueryColors() have the Red value populated, but Green and Blue values are all zero. On a different computer, the Green values are populated but the Red and Blue are all zeros.
I`ve read that 24-bit visuals actually use three colormaps, one for each color gun. But I can`t find any info on how to access the three colormaps.
Does anyone know if 24-bit visuals actually use three seperate colormaps, and if so, how do I locate them? I`m currently using DefaultColormap() to get the single in-use colormap.
Mon, 01/13/2003 - 12:27#1
Anonymous
24-bit colormaps
Hi Mr cgilbert
For 24 bit visuals you do not have to manipulate the colormaps. You need to fill the image structure with the correct
values ( ie red 0-65535 green 0 - 65535 and blue 0-65535) in a shifted manner. That is all to be coded in a single
long integer. Then you will get the right picture display. This setup is uniform across the system. I have worked
on IBM (AIX) / SGI (IRIX) system. I do not find any difference. And to my knowledge there can be a maximum of
256 color map entries can be there not more than that. If you explaing your problem more clearly. I may be able
to give you a solution.
B. Prabakaran
Bangalore