Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Monitors With More Than 256 Shades of Gray

Tags:

graphics

qt

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?

like image 503
Arlen Avatar asked May 30 '11 05:05

Arlen


Video Answer


1 Answers

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.

like image 151
timday Avatar answered Sep 21 '22 03:09

timday