Warnings with newer libpng versions (iCCP: known incorrect sRGB profile)

Bug #1195724 reported by excruciated on 2013-06-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Undecided
SirVer

Bug Description

When running Wl (recently built from source on Arch) I have lately been getting long lists of warnings saying the following:

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
...

Per, for example, http://www.playonlinux.com/en/topic-10442.html , this is due to a recent update to libpng where it now prints these warnings even though the incorrect color profiles will not really hurt anything and are safe to ignore (they are just annoying). As most (linux) systems are still using previous libpng versions, most are probably not seeing this. I am using Arch's libpng 1.6.2-3.

I wouldn't have reported this except for the fact that the fix is very simple with imagemagick. A large number of .png images in the Wl source have these incorrect profiles, but I got imagemagick to convert them en masse:

cd /usr/share/widelands
for i in `find . | grep .png`; do convert "$i" -strip "$i"; done

As it goes through, imagemagick will print:

...
convert: iCCP: known incorrect sRGB profile `./tribes/atlanteans/advanced_shield/menu.png' @ warning/png.c/MagickPNGWarningHandler/1830.
convert: iCCP: known incorrect sRGB profile `./tribes/atlanteans/baker/menu.png' @ warning/png.c/MagickPNGWarningHandler/1830.
convert: iCCP: known incorrect sRGB profile `./tribes/atlanteans/bakingtray/menu.png' @ warning/png.c/MagickPNGWarningHandler/1830.
...

But it will fix these problems, and the warnings from libpng when running Wl will be no more. If a similar process were done on the main Wl trunk, this would save users from having to do it themselves as the less-bleeding-edge distros begin to update to the new libpng.

SirVer (sirver) wrote :

Thanks for the report and the fix. This is very useful.

I think we must do this, the question is just when: when we do this, all .png files in the repo will change which will blow up the repo and be a huge commit. I suggest waiting till shortly before the next release (when we will also en masse pngoptimize the .pngs again I guess) to do this. What do others think?

Changed in widelands:
status: New → Incomplete
milestone: none → build18-rc1
Nasenbaer (nasenbaer) wrote :

I agree with SirVer.
Maybe this would be good to apply once the spritmap branch is merged?

SirVer (sirver) wrote :

Yes, this should be done with the spritemap. That means we will not do it for b18.

Changed in widelands:
milestone: build18-rc1 → build19-rc1
assignee: nobody → SirVer (sirver)
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Hans Joachim Desserud (hjd) wrote :

I can verify the warnings still appear with libpng 1.6.13-1. SirVer: What's the current status of the spritemap, has anyone looked at that lately? :)

Changed in widelands:
status: Incomplete → Confirmed
summary: - Warnings with newer libpng versions
+ Warnings with newer libpng versions (iCCP: known incorrect sRGB profile)
SirVer (sirver) wrote :

This can be addressed now again with the refactorings in place it should be easier to write a c++ tool that can compress and decompress the images.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers