[Development] Color Profile support on Qt

alexandros.dermenakis at nokia.com alexandros.dermenakis at nokia.com
Tue Jul 17 10:46:19 CEST 2012


What we presently have in a local branch is:

1) Grabbing embedded color profiles from PNG and JPEG images (eventually support for more formats will come)
2) Non-Automatic conversion of color profiles at load. This is done through the constructor, where when loading an image you specify weather you preserve the color profile or you convert to Screen. The default behavior keeps the loaded image unchanged.

What we don't have:
1) Exporting images with embedded color profiles
2) Modifying a color profile (access only to high level data such as description and colorspace)

The API looks as follows:

enum QColorSpace {RGB, CMYK, Invalid}

QColorProfile
-------------
QString description()
QColorSpace colorspace()


QImage
-------------
QColorProfile colorProfile()
void setColorProfile(colorProfile)
void convertToColorProfile(colorProfile)

QScreen
-------------
QColorProfile colorProfile()

Windows and Mac OS X have built in support for  color profile conversion. For linux X11 supports color profiles after loading several modules, otherwise uses sRGB. This is where the Oyranos project comes in.
All the color profile conversion takes place using the littleCMS library which seems to be sort of standard for that job. Oyranos is also using it.

________________________________________
From: development-bounces+alexandros.dermenakis=nokia.com at qt-project.org [development-bounces+alexandros.dermenakis=nokia.com at qt-project.org] on behalf of ext Boudewijn Rempt [boud at valdyas.org]
Sent: Monday, July 16, 2012 9:15 PM
To: development at qt-project.org
Subject: Re: [Development] Color Profile support on Qt

On Monday 16 July 2012 Jul, Olivier Goffart wrote:
> 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)

Are you really sure about that? It's extremely unlikely that one encounters a linear light rgb png file in the wild, for instance, most assume sRGB. Unmanaged RGB isn't automatically linear, either -- it most likely is just a mess.

--
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list