Bug 397293 - libpng error: profile 'icc': 0h: PCS illuminant is not D50
Summary: libpng error: profile 'icc': 0h: PCS illuminant is not D50
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-PNG (show other bugs)
Version: 6.0.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-09 03:34 UTC by jmjudeb
Modified: 2022-01-14 21:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0


Attachments
Output from "digikam debug" (32.00 KB, text/plain)
2018-09-03 02:53 UTC, jmjudeb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jmjudeb 2018-08-09 03:34:14 UTC
I am editing TIFF images, saving new versions as PNG.
After some number of images (~five with digikam v5.9, ~10 with v6.0), I get an error that the PNG cannot be saved.  stderr messages contain:
  libpng error: profile 'icc': 0h: PCS illuminant is not D50
After restarting digikam, it is possible to save to PNG with the same image, and the same editor settings.
This is not unique to particular tiff images, rather seems to be related to how much editing has been done in a particular digikam session.

There are no system/kernel error messages.
Comment 1 caulier.gilles 2018-08-10 09:06:04 UTC
Can you run the appimage from the console and report all debug trace printed while this kind of operation to convert TIFF to PNG ?

Can you reproduce the problem while converting TIFF to PNG with Batch Queue Manager ?

Did you enable the color management in DK setup dialog ? If yes, which icc color profiles did you use ?

Can you share a TIFF image for testing here ?

Gilles Caulier
Comment 2 caulier.gilles 2018-08-10 09:09:12 UTC
Perhaps this bug is also relevant, more and less : 386396

But i'm not 100% sure...

Gilles Caulier
Comment 3 jmjudeb 2018-08-10 18:11:15 UTC
Thank you so much, Gilles.  I appreciate the help!

I will rerun in a console with debug tracing and report back.

To me, the bigger problem is that digikam refuses to save a PNG image, but then happily saves the same image after restarting digikam.

I could not reproduce the problem using Batch Queue Manager.

Colour management is enabled in DK settings:
  - Working Color Space - srgb-d65.icm
  - Convert image to working color space
  - Assume it is using sRGB and convert it to working color space
  - Automatic color correction.

Problem 386396 could be related, but weird error messages are not as big a problem as refusing to save, then OK after restart.
Comment 4 caulier.gilles 2018-08-13 13:56:27 UTC
Can you share a TIFF image for testing here ?
Comment 5 jmjudeb 2018-09-03 02:53:26 UTC
Created attachment 114752 [details]
Output from "digikam debug"
Comment 6 jmjudeb 2018-09-03 02:58:39 UTC
This is a very difficult bug to reproduce consistently.  I finally found an image which I consistently cannot save in PNG format.

Next, I downloaded the latest beta to see if that made a difference.

Then I created a new directory, ~/DIGIHOME, and ran HOME=$HOME/DIGIHOME digikam debug with a small subset of my Pictures disk as input, including the troublesome image.  With this configuration, I could not reproduce the bug - I could save it in PNG format without trouble.

A tiff of the troublesome image can be found at: https://photos.app.goo.gl/8ouDT4N4WsYQJXLLA

When I exited digikam and reran with my regular home and existing picture database, I could not save to PNG format again.

I have attached output from "digikam debug" with my regular home directory and I have also attached the troublesome image.
Comment 7 caulier.gilles 2020-08-01 16:14:26 UTC
digiKam 7.0.0 stable release is now published and now available as FlatPak:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Thanks in advance

Gilles Caulier
Comment 8 caulier.gilles 2021-07-19 06:53:50 UTC
With next digiKam 7.4.0 release, AppImage bundle is compiled using a more recent Linux Mageia 7.1 host. Last stable Qt 5.15.2 and KF5 5.84 are used. ImageMagick codec 7 and libav 58 (ffmpeg) are used to supports extra image and video formats.

https://i.imgur.com/XV1tZkL.png

Please check if problem still reproducible with this version available as pre-release here:

https://files.kde.org/digikam/

Gilles Caulier
Comment 9 caulier.gilles 2022-01-10 07:49:54 UTC
Hi and happy new year,

Can you check if problem remain with digiKam 7.5.0 pre-release bundle available
here :

https://files.kde.org/digikam/

Thanks in advance

Gilles Caulier
Comment 10 caulier.gilles 2022-01-14 21:33:45 UTC
With my last changes done in bug #386396, i can now convert the TIFF image shared by Mike Berkley on google Photo (see link in comment #6)

I close this file now

Gilles Caulier