Bug 406710 - For HDR kra files, mergedimage.png and preview.png are in SDR and have wrong colors
Summary: For HDR kra files, mergedimage.png and preview.png are in SDR and have wrong ...
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: HDR (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-20 15:38 UTC by Tiar
Modified: 2019-04-24 16:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Image preview test image (947.85 KB, application/x-krita)
2019-04-20 15:38 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2019-04-20 15:38:07 UTC
Created attachment 119530 [details]
Image preview test image

SUMMARY
When you save a HDR .kra file, next time you open Krita and look at Last Documents, you see it all wrong. It's because it shows the content of mergedimage.png or preview.png (not sure which), which is automatically converted to SDR.



STEPS TO REPRODUCE
1. Make a new HDR image.
2. Save as .kra file.
3a. Open Krita, look at Last Documents on welcome screen.
3b. Open as an archive, extract mergedimage.png and preview.png. Open them in Krita.


OBSERVED RESULT
Last Documents shows miniatures with wrong colors.
Both images are in SDR and have wrong colors. (Some colors get lost while converting from float to integer.)


EXPECTED RESULT
Images in Last Documents are displayed correctly, in HDR.
mergedimage.png is in HDR or at least has float color space assigned, so the colors won't be horribly wrong when displayed.


SOFTWARE/OS VERSIONS
Version: 4.2.0-pre-alpha (git fb08951)
Windows: 10
Qt Version: 5.12.2
Comment 1 wolthera 2019-04-20 15:55:29 UTC
the original reason these are converted to sRGB was because of a request from David Revoy, and after that it also turned out stuff like shell-extensions and image previewer cannot be expected to handle sRGB properly.

We'll need a good lutbaking workflow for this.
Comment 2 Alvin Wong 2019-04-20 16:18:35 UTC
I would really suggest to not change the existing behaviour and use another file for a flattened HDR image (perhaps with colour profile includd). We should avoid breaking existing tools/shell extensions which makes use of preview.png and mergedimage.png. The existing tools may not support loading such images.