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



On Tuesday, February 18, 2003, at 06:49 AM, Peter Finderup Lund wrote:

On Tue, 18 Feb 2003, individual wrote:

Is there a way to display 48-bit-per-pixel image data? The API
reference entry for GdkRgbDither states:

"Since GdkRGB currently only handles images with 8 bits per component,
dithering on 24 bit per pixel displays is a moot point. "

Shift the pixel data each channel by 16 bits before you stuff them in.

It's very difficult to see the difference anyway and most X servers won't be able to give you a visual(*) with more than 8 bits per channel anyway.
Definitely not XFree86.  There are a few consumer grade cards out there
which will give you 10 bits per channel (or, I think, 10 bits for the
green channel and 8 for the others) but driver support for that is
probably scant.



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!

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.

Ok then, let's try it with a 1000 pixel wide gradient, but going from 255 red to 128 red. No bands. Hmm....

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?

Thanks for putting up with these questions!

Paul




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