[Development] Color Profile support on Qt
Niels Ole Salscheider
niels_ole at salscheider-online.de
Tue Jul 17 19:59:52 CEST 2012
Hello,
> All QPainter operations (at least in the raster engine) assume a linear
> color space. That means that the color conversion need to hapen last, right
> before being shown to the screen. After all kind of blending operations or
> anything done with QPainter. (That means it could even been done in the
> platform plugin)
>
> Color conversion should probably also happen when loading images, to convert
> them to a linear color space. Right now, Qt do no handle color profiles at
> all, so it interpret png for example as plain linear RGB instead of sRGB.
>
> I think QImage should always contains linear color space.
I agree. Qt should convert all images to a linear color space when loading
them so that this color space can be used as an immediate blending space.
The final images should be converted to the device color space (printer,
screen, ...) right before they are displayed.
It might even be possible to make the system compositor / printer driver
accept the images in this intermediate blending space. It they do, Qt does not
need to know about the output color profile and the system compositor can do
additional blending of output from different applications before applying color
correction for the output device.
This should be doable for Linux, at least.
> Are 32 bit ARGB is not enough for what Qt is doing? That is: show an UI on
> the screen.
> If you want to do professional image processing you would probably not use
> QImage, but one of those specialized image processing library that have
> 16bit per chanel or more capabilities.
No. 8 bit per pixel works for sRGB but is not nice for linear color spaces. I
think it would be best to use 16 bit per pixel for the immediate blending
space.
Regards,
Ole
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120717/36a1ce52/attachment.sig>
More information about the Development
mailing list