Re: Adding support for 4 bit color



 Jul 1 18:04:25 -0400 1998 Owen Taylor <otaylor@gtk.org> wrote:
> 
> 
> GDK comes from originally from the GIMP. And it's pretty nigh
> impossible to decently support full-color images, even with dithering,
> on a 4 bit display; adding 4 bit support to GDK is pretty trivial, but
> to get GTK+ fully working properly, you need to add support for
> rendering 4 bit color to gtkpreview.c - which expects either to have
> TrueColor visual, or a Pseudocolor visual where it can allocate a
> color cube. It isn't so obvious how to proceed in fixing GtkPreview 
> up.
> 
> Regards,
>                                                   Owen

I think the issue here is just to be able to run GTK+ applications on a 16
color display. Most of the GTK+ applications probably needs just a few
colors ?

I did some (true)color testing with GIMP and xv (would have been faster
with netscape tables but figured that out just now); How are colors choosen
for truecolor 3x2x2 cube, when I tested red having values 0, 85, 170, 255, 
blue 0, 255 and green 0, 255 the resulting colors when red were 0 or 85 were
pretty close to each other. Then I changed red values to 0, 128, 192, 255
and now the results were a bit better. See that color palette at
http://iki.fi/too/k/truetest16.gif

What is the case with GrayScale visuals. In the code I see some support for
8, 16 and 24 bit grayscale previews. How (if there is a way) are 1 bit
visual handled? 

I don't know much about this color issue, but someday I might be installing
linux on a system where I initially cannot run anything else than vga16
X server, and might want to run GTK+ applications on that configuration.
Therefore, any working solution is an interesting issue to me.

Tomi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]