Header image
avatar
Sönke Ludwig • Sat, 12 Mar 2022

Completing Color Management · Aspect Preview 22

The main goal of this release is to have full color management throughout the application. Everything from reading images with their associated color profile to properly converting to the gamut of the monitor during display is now handled properly.

In previous releases, we had partial color management implemented, but there were some missing pieces, such as gamut capped to sRGB and failure to handle associated color profiles on some images. To fix this, we chose to replace the existing approach with a more robust generic approach.

Color conversion flow

With the new system, all photos are internally converted to ProPhoto gamut (with linear gamma) - in fact, the whole user interface is rendered in this color space. Then, while drawing to the screen, the ProPhoto color space is converted to the color space of the monitor to ensure correct colors. This approach allows to operate on images mostly without worrying about their color space, reducing the complexity and potential for mistakes of code that operates on image data.

However, it is also more computationally expensive and requires the use of floating-point based colors. Floating-point colors in particular are a performance issue with Intel integrated GPUs, as frequently found in Intel based Macs. To compensate for this, we put additional effort into optimizing how the user interface is rendered.

But not just the display color management part had performance implications, the color conversion for images loaded from disk also became very apparent. JPEG images with an sRGB color profile in particular, which previously required no color conversion, now took more than twice as long to load.

Fortunately, we could turn this into a net positive by moving all of our existing image processing, as well as the new color conversion process, to the GPU. Not only is this faster now, but we also have laid the groundwork for more advanced GPU based image editing that is planned for future releases.

As always, check out the change log for all relevant changes in this release, in particular if you have experienced crashes in the past: Version 1.0.0-preview.22

Comments for the post are currently disabled.

0 comments