Bug 345913 - When importing 16bit png from Blender, the gamma is set wrong and image appears washed out
Summary: When importing 16bit png from Blender, the gamma is set wrong and image appea...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color models (other bugs)
Version First Reported In: 2.9.1
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: wolthera
URL: https://forum.kde.org/viewtopic.php?f...
Keywords:
: 345912 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-06 12:36 UTC by JayH
Modified: 2015-05-26 19:50 UTC (History)
3 users (show)

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


Attachments
Printscreen bug (2.92 MB, application/zip)
2015-04-27 12:34 UTC, fabien.guillou
Details
Images frome Blender (too bright in Krita) and Darkatable (too Dark in Krita) (1.66 MB, application/zip)
2015-04-27 13:13 UTC, fabien.guillou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JayH 2015-04-06 12:36:41 UTC
I rendered a test scene from Blender, a 16bit png, but when I import it into Krita 2.9.1 the images gamma is too bright.
Everything is set to sRGB as far as I can tell, so all should work fine.

I've tried the same image in Gimp (albeit converted I guess), Photoshop and RawTherepee, but all is well.

I was asked to file a bug by TheraHedwig, who said he is aware of the issue and knows the fix.

Good luck :)

Reproducible: Always

Steps to Reproduce:
1. Import 16Bit Image (in test from blender)
2. 
3.

Actual Results:  
Krita displays image wrong, too bright, gamma issue.

Expected Results:  
The image should be calibrated to display normally.
Comment 1 Halla Rempt 2015-04-06 12:50:27 UTC
You could also argue that it's a bug in blender, because blender had better save png images with a profile embedded, but I guess we'd best add dialog box that asks the user for a profile if there isn't one set. Will you look into this, Wolthera?
Comment 2 wolthera 2015-04-06 14:22:59 UTC
Yeah, I will. I'll see if I can annoy the blender devs about this as well. OCIO allows generating a ICC profile from the output, so Blender ought to be able to tag files with ICC profiles.
Comment 3 mvowada 2015-04-07 06:21:29 UTC
*** Bug 345912 has been marked as a duplicate of this bug. ***
Comment 4 fabien.guillou 2015-04-27 10:36:26 UTC
I have the same problem: with TIF images and PNG images from Blender. They are too dark or too bright when opening in Krita 2.9.2 .
I have the same problem with images png from Darktable. 

ALL is  ok in Krita 2.8.5
Comment 5 Halla Rempt 2015-04-27 11:20:25 UTC
Can someone please attach a png and a tiff file exported from blender that shows the problem?
Comment 6 fabien.guillou 2015-04-27 12:34:09 UTC
Created attachment 92266 [details]
Printscreen bug
Comment 7 fabien.guillou 2015-04-27 12:38:13 UTC
When i open an png from blender i have the profil sRGB-elle-V2-g10.icc and the file is too bright. I have to change my Display profile with the same.

When i open the same image in the Gimp. I have the sRGB built in profile and the image seem to be ok
Comment 8 wolthera 2015-04-27 12:49:55 UTC
Fabien, just so you know, we know exactly why the bug is happening(krita assigns a linear profile to unprofiled 16bit pngs by default in 2.9 as opossed to 2.8). This is a common problem with going from uncolour managed applications to a colour managed one, and that's why we consider it half a blender problem: blender is colour managed but doesn't output colour managed files.

Because we know what the problem is, we don't need screenshits of the problem, but actual files themselves, so we have files to test out our solution against.
If you are using Krita+Blender for production and can't wait, I suggest you use *.exr files for going between Blender and Krita: that should work flawlessly and you can convert it down in Krita.

So I appreciate your enthusiasm, but I would like to redirect it more productively :)
Comment 9 fabien.guillou 2015-04-27 13:13:55 UTC
Created attachment 92269 [details]
Images frome Blender (too bright in Krita) and Darkatable (too Dark in Krita)

Here you have 2 png from Blender and Darktable.
When i use open exr format from Blender i can't see the alpha channel in Krita that why i prefer import PNG files to use as masks.
Comment 10 wolthera 2015-04-27 13:14:59 UTC
Thank you.
Comment 11 Halla Rempt 2015-05-26 19:50:50 UTC
Git commit 310c38a9e1bc3e3bc8349ce5d6dfecf0375f6d7e by Boudewijn Rempt.
Committed on 26/05/2015 at 19:48.
Pushed by rempt into branch 'calligra/2.9'.

Depending on the paste settings (ask every time/assume), on loading
a PNG file without an embedded profile we will now ask for a profile,
or we'll assume sRGB (which makes more sense for PNG files than
linear, if something is linear, there'll be a profile, almost always.)

Note: the proliferation of places where we hard-code
"sRGB-elle-V2-srgbtrc.icc" is becoming a problem, and that needs
fixing.

M  +2    -1    krita/plugins/formats/png/kis_png_import.cc
M  +2    -0    krita/ui/CMakeLists.txt
A  +57   -0    krita/ui/dialogs/kis_dlg_png_import.cpp     [License: LGPL (v2+)]
A  +42   -0    krita/ui/dialogs/kis_dlg_png_import.h     [License: LGPL (v2+)]
A  +74   -0    krita/ui/forms/wdgdlgpngimport.ui
M  +61   -20   krita/ui/kis_png_converter.cpp
M  +3    -1    krita/ui/kis_png_converter.h

http://commits.kde.org/calligra/310c38a9e1bc3e3bc8349ce5d6dfecf0375f6d7e