Bug 391487 - Krita ignores PNG EXIF data
Summary: Krita ignores PNG EXIF data
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 3.3.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-06 22:31 UTC by Danas
Modified: 2018-03-07 16:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danas 2018-03-06 22:31:18 UTC
Hello, 

I just faced with an issue that Krita seems to don;t see exif data in PNG images, it is fine with TIFF and JPG files, but when it comes to PNG, it looks like Krita doesn't see Exif data. Checked with Image viewer and GIMP 2.9 and same file shows Exif as it should, but Krita seems to ignore that there is exif data. Checked on Krita 3.3.3 and Krita 4 beta. same result. 

OS: Kubuntu 17.10 latest updates.
Comment 1 Danas 2018-03-06 22:33:38 UTC
Sample image to test the bug
https://drive.google.com/open?id=1Z7P78WYmJWo9GfsU3MtqoFaM0LXZ2ej3
Comment 2 Halla Rempt 2018-03-07 08:40:34 UTC
On loading the image I see the following error:

krita.core: Missing name attribute for tag  "date"

I wonder whether that means that the exif info is actually malformed... The metadata parser in Krita is eleven years old by now so it's guesswork to figure out what the code is doing...
Comment 3 Halla Rempt 2018-03-07 10:17:03 UTC
Hm, that's not on loading, but on showing the metadata editor.
Comment 4 Danas 2018-03-07 12:14:05 UTC
I am not good at technical details, but it appears that it just doesn;t want to accept EXIF from PNG. I use Darktable for processing RAW images, so everything I through to Krita is directly from Darktable with no modifications. If have JPG or TIFF it is fine, but if it is PNG then it doesn;t work, exif seems to not exist. But in Gwenview and GIMP 2.9 everything is fine with Exif and it shows it as usually. 

I wonder if it would be possible to force Krita to always keep Exif data from first layer? One thing I noticed that many times Krita doesn;t load exif once I close and load the .kra file even with JPG and Tiffs. It would be cool if it was possible to force Krita to always keep Exif data from the first loaded layer and have it as an option for krita document so that when you export to JPG or any other format the one wouldn't need to merge all layers and give priority to the first layer metadata. The document could always use the metadata of the first layer. Just a thought. Nowadays I use Krita a lot for photo editing instead of painting which is not primary function of Krita.
Comment 5 Halla Rempt 2018-03-07 16:10:38 UTC
Git commit fc8234ddc08f60b7f9c4292eed64fb165c326579 by Boudewijn Rempt.
Committed on 07/03/2018 at 16:10.
Pushed by rempt into branch 'master'.

Load metadata in PNG files

We lower-cased the keys, then compared it with cased keynames.

M  +8    -5    libs/ui/kis_png_converter.cpp

https://commits.kde.org/krita/fc8234ddc08f60b7f9c4292eed64fb165c326579
Comment 6 Halla Rempt 2018-03-07 16:10:57 UTC
Git commit ca695ead656e4dc1cf031dadc86013ba3f228fc2 by Boudewijn Rempt.
Committed on 07/03/2018 at 16:10.
Pushed by rempt into branch 'krita/4.0'.

Load metadata in PNG files

We lower-cased the keys, then compared it with cased keynames.

M  +8    -5    libs/ui/kis_png_converter.cpp

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