Re: 24-bit-per-pixel limit to Gdk RGB ?



On Tue, 2003-02-18 at 08:08, individual wrote:

Wait... we must be misunderstanding each other. Last night I realised 
that for Gtk to be limited to 8-bit colour is absolutely ludicrous! Gtk 
is the Gimp Toolkit, and the Gimp is for hight quality images!


No.  Gimp is limited to 24-bit color.  Film gimp, on the other hand,
uses 16-bit per channel (I think)--48-bit, just like what you're trying
to do--making it more suitable for work on film.  See
http://filmgimp.sourceforge.net.  However, on XFree86, even Film Gimp
will still have to render to a 24-bpp display.

But, on the other hand, I must admit I am a bit confused by this issue.

As I understand it, 8 bits per channel will give me 256 levels of 
colour for each colour. If I were to make a gradient of red, for 
example, in The Gimp, I would expect to see bands of colour in a 
red-to-black gradient that is as wide as my monitor (about 1000 
pixels), which should make each band about 4 pixels wide. I tried it 
and... er... no bands visible.

Yep.  That's 256 bands of color.  Enough colors, that the break between
colors isn't going to be that noticable.  The bands are there, but your
eye can't make them out because they are so small (they blend together).


  Ok then, let's try it with a 1000 pixel wide gradient, but going from 
255 red to 128 red. No bands. Hmm....
That should be 128 bands of color, each about 7 pixels wide.  The bands
are wider, but not wide enough to notice significant banding, especially
if you were on a CRT.


Ok, last attempt: I made a 1000 pixel wide gradient going from 255 red 
to 254 red. In the colour selection panel, I can clearly see the 
difference between the two colours. When I draw the gradient, there is 
no dividing line. HA! I have therefore proved that The Gimp and my X 
server  are capable of displaying colour at more than 8 bits per 
channel. Or have I?

Now you have 2 bands of color, each about 500 pixels wide.  So you'll
definitely see it.  The less colors you have and the wider the bands,
the more noticable it is.

Nope you haven't proven anything.  You're still drawing 8-bits per
channel.  Do an 'xdpyinfo' and you'll see the visual is 24 bpp.  Nothing
you can do will change that.  To display a 48-bpp image ona 24bpp
screen, you need to chop the least significant bits off each channel
(shift right) until each channel is 8-bits.  Then you can render it to a
24 bpp screen and get a decent approximation.  If you chop the bits and
then draw to a 24-bpp GtkRGB, then you can have it dither the image onto
screens with even less colors, like 256 colors.

Anyway, it's all about approximation.

Michael



Thanks for putting up with these questions!

Paul

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
Michael L Torrie <torriem cs byu edu>



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