From 7c493f76f836095adad08205fdfd4522e05e0bd4 Mon Sep 17 00:00:00 2001 From: Michael Henning Date: Sat, 15 Feb 2014 22:55:18 -0500 Subject: [PATCH] Bug 721135 - Unable to export to .png - error: known incorrect sRGB profile Some libpng errors can safely be marked as nonfatal, which is much better than simply failing in those cases. Thanks to John Bowler for pointing out this solution. --- plug-ins/common/file-png.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c index 14902f0458..1c33208838 100644 --- a/plug-ins/common/file-png.c +++ b/plug-ins/common/file-png.c @@ -828,6 +828,9 @@ load_image (const gchar *filename, return image; } + /* Change some libpng errors to warnings (e.g. bug 721135) */ + png_set_benign_errors (pp, TRUE); + /* * Open the file and initialize the PNG read "engine"... */ @@ -1447,6 +1450,9 @@ save_image (const gchar *filename, return FALSE; } + /* Change some libpng errors to warnings (e.g. bug 721135) */ + png_set_benign_errors (pp, TRUE); + /* * Open the file and initialize the PNG write "engine"... */