[Digikam-devel] White Balance and gamma for 16 bits RAW image without to use Color Management.

Gilles Caulier caulier.gilles at gmail.com
Mon Mar 10 15:56:12 GMT 2008


Hi all,

There are several entries in bugzilla about to be able to load RAW image in
16 bits color depth without to use Color Management with a valid ICC color
profile for your camera.

http://bugs.kde.org/show_bug.cgi?id=146393
http://bugs.kde.org/show_bug.cgi?id=124814
http://bugs.kde.org/show_bug.cgi?id=150457
http://bugs.kde.org/show_bug.cgi?id=155074

Like you now, dcraw provide a linear histogram image, and result image is
generally a black hole... More details can be seen at this url :

http://www.guillermoluijk.com/tutorial/dcraw/index_en.htm

There is a patch here against RAW image loader from digiKam core for KDE3 to
fix this problem :

http://digikam3rdparty.free.fr/misc.tarballs/raw16bitsautogamma.patch

In this patch, the following operations are processed :

- An auto-exposure correction using white-balance algorithm from digiKam
core.
- A gamma correction to 2.0 (BT.709 adjustment) using gamma algorithm from
digiKam core.
- sRGB ICC color-space profile assignment.

In theory, the Gamma value for BT.709 adjustment must by 2.2222, but after
severals tests, 2.0 sound like the most adapted...

I have compared digiKam with this patch against :

- 8 bits raw decoding from DCRAW. This one adjust automatically
white-balance/gamma
- Last LightZone version for Linux (witch use dcraw internally) and do not
use Color Management in Raw workflow.

... the results are similar. It's not perfect, but suitable as well. Look
screenshots available here :

http://digikam3rdparty.free.fr/Screenshots/RAW16bitsAutogamma/

You can see:

- On the Left, a PNG file generated from a RAW image using dcraw with 8 bits
color depth and auto-gamma
- On the middle, the RAW image decoded in digiKam in 16 bits color depth
with this patch
- On the right, the RAW image open in LightZone image editor.

Feedback are welcome. Thanks in advance

Gilles Caulier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20080310/69ab0c31/attachment.html>


More information about the Digikam-devel mailing list