24 bit-per-pixel thread



Hi
I have been folowing the thread, and all i can do is post what i know,
wich is not the last word, of course...

There is two kind of "visuals", truecolor and indexed (indexed are out
of the scope)

BPP     R       G       B       A

15      5       5       5       0
16      5       6       5       0
24      8       8       8       0
32      8       8       8       8

Actualy 32bpp is not a visual, alpha channel is used into the program or
if the hardware have acceleration for overlay, etc... but there is no
alpha structure in X.
Human eye can distinguish more luma(grayscale) than croma(colors), that
is why, when the light is very low we start to see in grayscale.
Because we have more luma receptors than croma (don know the name in
english :). This fact was used long ago by the people who invent the TV
signal. NTSC for example, it uses YUV or YIQ (is is the same for this
pourpose) half brandwidght for Y (luma) and the other half for UV.
MPEG and its derivates like JPEG uses the same principle (see
subsampling 2:1:1, 4:2:2 etc)
So i do not recomend using a jpg to store cientific data, instead BMP is
so basic that there is no way to loose data (tiff can be saved as jpeg:)

So i recommend you to use all the bits you want per pixel in an internal
data structure (array) and then shift to 8bpp to display it :)

chau

Juan Pablo

http://xjuan.gq.nu





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