[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [digikam] [Bug 386396] New: Eliminate useless and misleading libpng terminal message
From:       Elle Stone <bugzilla_noreply () kde ! org>
Date:       2017-10-31 18:25:28
Message-ID: bug-386396-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=386396

            Bug ID: 386396
           Summary: Eliminate useless and misleading libpng terminal
                    message
           Product: digikam
           Version: 5.7.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: FilesIO-PNG
          Assignee: digikam-bugs-null@kde.org
          Reporter: elle@ninedegreesbelow.com
  Target Milestone: ---

Upon creating a new database, and probably every time digikam is run, the
following lines are printed to the terminal:

digikam.dimg: "/usr/share/digikam/data/sample-aix.png"  : PNG file identified
digikam.metaengine: Loading image history  ""
digikam.metaengine: DateTime => Exif.Photo.DateTimeOriginal => 
QDateTime(2010-07-27 06:40:05.000 EDT Qt::TimeSpec(LocalTime))
libpng warning: iCCP: known incorrect sRGB profile

For unfathomable reasons, libpng searches for and flags certain sRGB profiles
as problematic. Once such profile is an sRGB profile that is commonly found on
Windows computers and consequently also in images downloaded from the internet.
There is absolutely nothing wrong with this profile and probably nothing with
other profiles that libpng flags. But the error messages cause consternation
for users.

This GIMP bug report has a patch that shows how to eliminate this misleading
libpng "known incorrect sRGB profile" terminal message: Deal with libpng error
gracefully when exporting an image with the color profile "sRGB IEC61966-2.1":
https://bugzilla.gnome.org/show_bug.cgi?id=765850#c3

The GIMP bug report references an imagemagick forum discussion on the topic.
Quoting from the GIMP bug report:

#Begin quote: 
The attached patch suppresses these libpng terminal warnings. It just adds this
option: png_set_option(pp, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);

But maybe I should have added all of this as per the third-from-last post
    #if defined(PNG_SKIP_sRGB_CHECK_PROFILE) && \
        defined(PNG_SET_OPTION_SUPPORTED)
       png_set_option(png, PNG_SKIP_sRGB_CHECK_PROFILE,
           PNG_OPTION_ON);
    #endif
This option to suppress the libpng known incorrect sRGB profile warning is
available starting with libpng 1.6.11, which was released back in 2014.

#End quote.

Of course the patch attached to the GIMP bug report
(https://bug765850.bugzilla-attachments.gnome.org/attachment.cgi?id=334241)
won't work with digiKam. But the relevant code changes to disable the png
warnings are hopefully easy to port over to digiKam.

-- 
You are receiving this mail because:
You are watching all bug changes.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic