pseudocolor visual and colormap for PIL or tk?

Eric Frey frey at
Tue Sep 5 14:29:08 CEST 2000

Is it possible to set up a window to display an image with a pseduocolor visual
and use an installable colormap? I am trying to display grayscale images
on an 8 bit display and the default TrueColor visual results in a limited
number of gray values so the images look posterized. What I would like is to 
set up a colormap, allocate the number of grayscale values I need, and then install the colormap when my window is active. I know this will make the other
windows look ugly, but I don't mind. I have done this in C before, but am 
wondering if there is a way to do it in Tkinter and python on UNIX. Thanks.

Eric C. Frey  
Assistant Professor
Department of Biomedical Engineering and Department of Radiology
The University of North Carolina

More information about the Python-list mailing list