[gimp] Bug 765850 - Deal with libpng error gracefully when exporting...



commit ccb30a625c14a93c2d94b00bafbe6082faa910f7
Author: Elle Stone <ellestone ninedegreesbelow com>
Date:   Fri Aug 26 15:11:12 2016 -0400

    Bug 765850 - Deal with libpng error gracefully when exporting...
    
    ...an image with the color profile "sRGB IEC61966-2.1"
    
    Eliminate libpng warnings about known incorrect sRGB profiles.
    
    These "known incorrect sRGB profiles" are only considered "incorrect"
    by libpng. Such profiles are perfectly good sRGB profiles currently
    being embedded by PhotoShop 5 and 6 and also already embedded in many,
    many images on the web.

 plug-ins/common/file-png.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 00feed0..6efb7f1 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -878,6 +878,9 @@ load_image (const gchar  *filename,
 #ifdef PNG_BENIGN_ERRORS_SUPPORTED
   /* Change some libpng errors to warnings (e.g. bug 721135) */
   png_set_benign_errors (pp, TRUE);
+
+  /* bug 765850 */
+  png_set_option (pp, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);
 #endif
 
   /*
@@ -1522,6 +1525,9 @@ save_image (const gchar  *filename,
 #ifdef PNG_BENIGN_ERRORS_SUPPORTED
   /* Change some libpng errors to warnings (e.g. bug 721135) */
   png_set_benign_errors (pp, TRUE);
+
+  /* bug 765850 */
+  png_set_option (pp, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);
 #endif
 
   /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]