SUMMARY digikam break icc profile in png when modifiying metadata STEPS TO REPRODUCE 1. create a png with an icc profile like ProPhotoRGB (using imagemagick) convert -profile /usr/share/color/icc/colord/sRGB.icc rose: -profile /usr/share/color/icc/colord/ProPhotoRGB.icc rose.png 2. create another png, to by modified by digikam convert -profile /usr/share/color/icc/colord/sRGB.icc rose: -profile /usr/share/color/icc/colord/ProPhotoRGB.icc rose_modified.png 3. with digikam, just change anything on any metadata on the rose_modified.png (tags, xmp, or iptc) OBSERVED RESULT the profile information has disappear on rose_modified.png and the color profile is not readed anymore.. that cause the picture to be faded if you convert rose.png to rose2.png there's no error convert rose.png rose2.png but if you convert rose_modified.png to rose_modified2.png you will get digikam break icc profile in png when modifiying metadata convert-im6.q16: iCCP: profile 'ICC PROFILE': B0070078h: exceeds application limits `rose_modified.png' @ warning/png.c/MagickPNGWarningHandler/1654. convert-im6.q16: iCCP: CRC error `rose_modified.png' @ warning/png.c/MagickPNGWarningHandler/1654. EXPECTED RESULT change metadata shouldn't change the profile SOFTWARE/OS VERSIONS Linux/KDE Plasma: linux Mint 19 (available in About System) KDE Plasma Version: KDE Frameworks Version: 5.49 (appimage) Qt Version: 5.9.6 (appimage) ADDITIONAL INFORMATION tested with Digikam 6.0 beta2 (appimage ) also did some tests with exiv2, but there's no error at all adding metadata to png doesn't do any corruption of the icc profile. so it doesn't seems to be a problem with exiv2
The error is in the Exiv2 library. The problem can also be reproduced with the Exiv2 CLI tool and is therefore independent of digiKam. Please create a bug report for Exiv2 on GitHub. Maik
what kind of command did you use to reproduce de problem on exiv2 ? because i did a test with those commands exiv2 -M"reg myprefix http://ns.myprefix.me/" -M"add Xmp.myprefix.Whom Mr. Smith" -M"set Exif.Image.Artist Mr. Smith" rose_modified.png exiv2 -M"set Exif.Photo.UserComment charset=Ascii New Exif comment" rose_modified.png exiv2 -M'set Xmp.dc.title lang="de-DE" Euros' rose_modified.png and there was no problems.. i'm using the exiv2 bundled with ubuntu 18.04 (or mint 19)
I suspect that the Exiv2 version under Ubuntu is still 0.26. In the AppImage we use the 0.27-RC1 and also my CLI tool is the 0.27-RC1. Then the bug with the new version was introduced, I check it. Maik
for ubuntu, 0.25 in fact exiv2 --version exiv2 0.25 001900 (64 bit build) Copyright (C) 2004-2015 Andreas Huggel.
The problem here is also to reproduce with Exiv2-0.26 CLI tool, so that problem is not new in the developer version 0.27-RC1. I can not test Exiv2-0.25 anymore. The question is, however, if not the libpng version influences it. Which libpng do you have installed? Maik
i'm using the appimage, so.. digikam might use the one inside. in ubuntu 18.04 libpng is 1.6.34
The problem is reported to Exiv2 with a patch. https://github.com/Exiv2/exiv2/issues/597 Maik
The bug is now fixed with Exiv2-0.27.1. The new pre-release AppImage from https://files.kde.org/digikam/ contains this version. I close the bug now. Maik