Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#35363 - [gimp] Can't export in PNG format (libpng error: known incorrect sRGB profile)

Attached to Project: Arch Linux
Opened by Stefano (masque) - Sunday, 19 May 2013, 15:10 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 03 October 2013, 13:41 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Isenmann Daniel (ise)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 12
Private No


When I try to export to a PNG file I obtain an error and a zero byte file.

Additional info:
* package version(s)
gimp 2.8.4-2
libpng 1.6.2-3

* config and/or log files etc.
libpng error: known incorrect sRGB profile

Steps to reproduce:
Open an image. Try to export to png.
This task depends upon

Closed by  Dave Reisner (falconindy)
Thursday, 03 October 2013, 13:41 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See final comment
Comment by Antonio Vázquez Blanco (antoniovazquezblanco) - Sunday, 19 May 2013, 17:21 GMT
Also happening to me. Should be confirmed.
Comment by Eric Belanger (Snowman) - Tuesday, 21 May 2013, 01:15 GMT
works fine here. Can you attach an image file that triggers that error?
Comment by Stefano (masque) - Tuesday, 21 May 2013, 05:15 GMT
Image attached.
Comment by Stefano (masque) - Tuesday, 21 May 2013, 05:18 GMT
With this, however, it works
Comment by Felix Yan (felixonmars) - Thursday, 23 May 2013, 06:28 GMT
I did this to workaround this problem, could you confirm it?

Menu - Image - Mode - Convert to Color Profile ...

Then just click "Convert" to convert it to "RGB workspace (sRGB built-in)"

Now exporting to PNG just works flawlessly.
Comment by Stefano (masque) - Thursday, 23 May 2013, 06:53 GMT
@felixonmars: I tried the workaround and it works :)
Comment by Marc Miralles Biosca (Arcnexus) - Tuesday, 28 May 2013, 12:03 GMT
Also for me. it fails in png export
Comment by Alex George (ZeroKnight) - Saturday, 08 June 2013, 06:21 GMT
+1 happens for me as well. The workaround suggested by Felix worked. Thanks!
Comment by Peter Miller (agentorange96) - Friday, 21 June 2013, 16:05 GMT
You also can't open .png's either.
I had reported this bug to GIMP and they told me to report it to Arch instead. Looks like someone already did. :)

And to note: /usr/lib/gimp/2.0/plug-ins/file-png exists as it should.
Comment by Antonio Vázquez Blanco (antoniovazquezblanco) - Saturday, 22 June 2013, 07:29 GMT
This is not related to GIMP as this also happens in vdrift or the image magic tools. This is related to libpng wich has published an update (1.6.2) with some mor strict rules about iccp. As it turns out this is not a bug as it should always appear as a warning, but every png throwing this error should be corrected. You can fix them by runing the convert tool from image magic suite (convert file.png file.png) and it will fix the problem.

I don't want to imagine what will happen when other distros such as debian or ubuntu will update libpng.

Hope it helps.
Comment by Bersam (Bersam) - Thursday, 29 August 2013, 07:45 GMT
I still have this problem with latest updated gimp and libpng
Comment by cfr (cfr42) - Saturday, 31 August 2013, 03:22 GMT
If it is a problem in the png files, how is it affecting export to png?
Comment by Jack O'Connor (oconnor663) - Friday, 20 September 2013, 20:52 GMT
It looks like it's a problem with the color profile of the PNG. Antonio's workaround above is good. Here's the warning that convert is showing:

convert: iCCP: known incorrect sRGB profile `myimage.png' @ warning/png.c/MagickPNGWarningHandler/1830.

GIMP seems to be keeping the broken color profile from the image. Another workaround within GIMP is to just create a new image and copy/paste the contents from the broken one. Then you should be able to export without any trouble.
Comment by Doug Newgard (Scimmia) - Sunday, 29 September 2013, 21:26 GMT
It's not GIMP, it's libpng that's causing this behavior. It's not a bug, it's part of 1.6; the old HP sRGP profile has a bad whitepoint and they're trying to do away with it. The best option is to just remove the embedded profile by going to Image | Mode | Assign Color Profile and setting it to the sRGB built in. Alternatively you can do Convert Color Profile and load your own from disk if you really need an embedded profile for some reason.

Note that this isn't a workaround, it's a correct fix for working with libpng 1.6