[Development] Color Profile support on Qt

Christoph Feck christoph at maxiom.de
Mon Jul 16 18:25:20 CEST 2012


On Monday 16 July 2012 17:42:45 alessandro.portale at nokia.com wrote:
> (Sorry for top-posting, as-well)
> 
> Great to see Qt soon supporting color profiles! I agree with Johan
> that color profile handling and conversion should be an opt-in
> feature.
> 

I agree with the previous posters that any color correction should be 
in control of the application author. A single "convert to appropriate 
colors for screen/printer" call is nothing compared to the trouble of 
automatic conversions that cannot be undone, or only undone with loss 
of quality.

> Just a few questions:
> 1) Would Qt use (and ship) a color conversion library, or would the
> system library be used where available (e.g. on OSX and Windows)?

Regarding native platform support, we should work together with 
Oyranos developers. While their API is horrible (maybe because it is 
so non-Qt'ish), they have in-depth knowledge about the theory and the 
praxis of color management. Maybe with their expertise, we can create 
a nice API for application developers to interface the platforms.

> 2) Would the screen color profiles that are specified in the
> system screen settings automatically be used? 3) Sometimes, there
> are different profiles defined -one per screen (and printer)-.
> Would we have an additional parameter to specify the screen id?

Color correction opens another can of worms: Qt only supports 8 bit 
per component images, which was state of the art twenty years ago.

Having QImage support at least 16 bit per component would not only 
increase precision when doing conversions, but also allow it to load 
"modern" image formats, such as PNG, PBM, TIFF, EXR, JPEG-LS, 
JPEG-2000, etc. (I am not talking about pixmaps or rendering here, the 
final result may be displayed at 8 bit precision, but internally Qt 
needs more depth when it comes to correctly colored images).

Also, the new printing framework in Qt should use the new 
QtColorManagement module, so some coordination with experts would be 
needed.

-- 
Christoph Feck
http://kdepepo.wordpress.com/
KDE Quality Team

> 
> I hope not to complicate things with my questions :)
> ________________________________________
> From:
> development-bounces+alessandro.portale=nokia.com at qt-project.org
> [development-bounces+alessandro.portale=nokia.com at qt-project.org]
> on behalf of Dermenakis Alexandros (Nokia-MP/Oslo) Subject:
> [Development] Color Profile support on Qt
> 
> Hi,
> 
> I am working on adding support for color profiles on Qt 5. It is
> under discussion if the default behavior of QImage shall be:
> 
> 1) converting from an embedded color profile to the screen color
> profile when loading an image OR
> 2) keep the loaded image in the source color space, until the
> programmer explicitly requests color conversion.
> 
> Solution 1 : QImage(xxxx, QColorProfile = Preserve_Embedded)
> * Keeps the old Qt behavior (providing backwards compatibility
> without the need of tweaking the code)
> 
> Solution 2 : QImage(xxxx, QColorProfile = Convert_To_Screen)
> * Fixes some "bugs" in applications that use QImage directly for
> visualizing images (i.e. okular) * Better for newly developed
> applications since color profile conversion takes place
> automatically Presently when an image is loaded it always gets
> interpreted as sRGB and no color conversion takes place.
> 
> Thanks in advance!
> 
> ________________________________________
> From:
> development-bounces+alessandro.portale=nokia.com at qt-project.org
> [development-bounces+alessandro.portale=nokia.com at qt-project.org]
> on behalf of ext e8johan at gmail.com [e8johan at gmail.com] Sent:
> Monday, July 16, 2012 17:03
> To: development at qt-project.org; Dermenakis Alexandros
> (Nokia-MP/Oslo) Subject: Re: [Development] Color Profile support
> on Qt
> 
> Sorry for top posting.
> 
> Be aware that all usages of QImage goes not target the local
> screen. I.e. explicitly requesting a conversion seems to be the
> best option to me.
> 
> Regards,
> 
> Johan
> On 2012-07-16 16:31 alexandros.dermenakis at nokia.com wrote:
> Hi,
> 
> I am working on adding support for color profiles on Qt 5. It is
> under discussion if the default behavior of QImage shall be:
> 
> 1) converting from an embedded color profile to the screen color
> profile when loading an image OR
> 2) keep the loaded image in the source color space, until the
> programmer explicitly requests color conversion.
> 
> Solution 1 : QImage(xxxx, QColorProfile = Preserve_Embedded)
> * Keeps the old Qt behavior (providing backwards compatibility
> without the need of tweaking the code)
> 
> Solution 2 : QImage(xxxx, QColorProfile = Convert_To_Screen)
> * Fixes some "bugs" in applications that use QImage directly for
> visualizing images (i.e. okular) * Better for newly developed
> applications since color profile conversion takes place
> automatically Presently when an image is loaded it always gets
> interpreted as sRGB and no color conversion takes place.
> 
> Thanks in advance!
> 
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list