Today's display monitors have 8-bit per channel, or 24-bit color, and most of them operate in the sRGB开发者_如何学C color mode. GUI and graphics library such as Qt and X operate within these limits. e.g., you can create a QImage from an array of unsigned chars (8-bit per channel), but no more.
So what happens to those high-end display monitors that offer, say, 1024 shades of gray? Qt doesn't offer 30bit color mode, and neither does X. How does one utilize all the bits per channel?
Use OpenGL. Docs from AMD and Nvidia.
In a Qt app, I'm guessing (haven't tried) it ought to be possible to obtain a high bit-depth area for the application by creating a QGLWidget with an appropriately set up QGLFormat (set the bit depths with setRedBufferSize etc). Note that things like QPainter work very well on QGLWidget, so it's may not be necessary to port all your Qt code to OpenGL calls, only the bits you actually want to access the extra precision. The limited formats supported by QImage is certainly a bit of a weakness here though.
The extra colors are utilized, even if you cannot control them directly through your DVI link. Ever heard of color calibration?
Only very few specialized solutions allow directly controlling 30-bit color. (Though it becomes slowly more popular with DisplayPort)
精彩评论