Bug 375479 - 16-bit files are too bright; Krita should read the TIFFTAG_DCSGAMMA tag
Summary: 16-bit files are too bright; Krita should read the TIFFTAG_DCSGAMMA tag
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 3.1.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-23 23:39 UTC by sparhawk
Modified: 2017-01-24 09:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sparhawk 2017-01-23 23:39:27 UTC
= Steps to reproduce =
* Process RAW image with Ufraw; export as 16-bit TIFF.
* Import image into Krita.

= Observed result =
* Image looks too bright.

= Expected result =
* Image looks normal. This is confirmed in Gimp (git version), Dolphin's preview, and Gwenview.
* See screenshot showing Gimp on the left and Krita on the right. As you can see, the histograms look consistent between the two.
http://i.imgur.com/HsqDcUG.png

* In addition, exporting from Ufraw into 8-bit, then viewing this file in Krita works fine.

Originally posted in the KDE forum: https://forum.kde.org/viewtopic.php?f=139&t=138594

boudewijn stated:
> Hm, that tiff file has a tag saying 'sRGB' and a gamma value, but no embedded profile, so Krita selects the 1.0 gamma profile, which explains the way it looks different.
> Please make a bug report -- we should read the TIFFTAG_DCSGAMMA tag and take it into account when selecting the default rgb profile, so this is a bug.
Comment 1 Halla Rempt 2017-01-24 09:02:06 UTC
Hm, no... I was wrong. That image doesn't contain a gamma tag. No idea where imagemagick gets it from then.
Comment 2 Halla Rempt 2017-01-24 09:23:26 UTC
Git commit 33ea3d9259fb3ca1345ca2d5efeee788889b9a16 by Boudewijn Rempt.
Committed on 24/01/2017 at 09:23.
Pushed by rempt into branch 'master'.
Related: bug 16

Assume that 16 bit rgb tiff files without a profile are gamma corrected.
It would be better for people not to generate these files, or if they
did, add the TIFFTAG_DCSGAMMA tag to specify the gamma, but that's
unlikely to happen.

M  +9    -4    plugins/impex/tiff/kis_tiff_converter.cc

https://commits.kde.org/krita/33ea3d9259fb3ca1345ca2d5efeee788889b9a16
Comment 3 Halla Rempt 2017-01-24 09:23:36 UTC
Git commit f5a54f8b5f8656a86374438803b2dccdcd67628b by Boudewijn Rempt.
Committed on 24/01/2017 at 09:23.
Pushed by rempt into branch 'krita/3.1'.
Related: bug 16

Assume that 16 bit rgb tiff files without a profile are gamma corrected.
It would be better for people not to generate these files, or if they
did, add the TIFFTAG_DCSGAMMA tag to specify the gamma, but that's
unlikely to happen.

M  +9    -4    plugins/impex/tiff/kis_tiff_converter.cc

https://commits.kde.org/krita/f5a54f8b5f8656a86374438803b2dccdcd67628b