Today's display monitors have 8-bit per channel, or 24-bit color, and most of them operate in the sRGB 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With