Prev | Current Page 117 | Next

Chris Tyler

"X Power Tools"


3.17
3.17 Configuring the Resolution of a Screen 65
8-bit
256 colors using a PsudeoColor visual.
16-bit
65,536 colors using a TrueColor visual. Sixteen-bit values fit nicely into 2 bytes,
but there are 3 colors channels (red, green, and blue), and 16 doesn??™t divide
evenly by 3. The red and blue channels are usually assigned 5 bits and the green
channel is assigned 6, because the human eye seems to be slightly more sensitive
to variations in green than in red or blue. Some hardware will actually assign 5
bits per channel (32,768 colors).
24-bit
Just over 16 million colors using a TrueColor visual. Since most modern processors
perform 32-bit writes, the 24 bit values will usually be contained in a 32-bit
word.
48-bit
About 28 trillion colors using a TrueColor visual. This requires specialized and
expensive hardware, and you won??™t notice the extra colors on a desktop monitor
??”but 48-bit color is used for film production (such as in Hollywood).
Current display hardware is optimized for 24-bit processing; some GPUs will also
accelerate 16-bit operations.
However, 24-bit data (stored into 32-bit words) can be managed more easily than 16-
bit data on 32-bit hardware. Changing one 24-bit pixel requires a single write; but
changing one 16-bit pixel (where 2 pixels are stored in each 32-bit word) requires a
read of the current pixel value, an AND operation to clear out the old value of the
affected pixel while keeping the value of the unaffected pixel, an OR operation to
insert the new pixel value, and then a write to memory.


Pages:
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
zakłady bukmacherskie doktorat Meble Gabi Wczasy nad morzem drzwiowe