[gegl] png-load: do not reinterpret gamma when using ICC profile



commit 494234cd3e4e1ac88b9062bb5f9d94e11083e5e0
Author: Øyvind Kolås <pippin gimp org>
Date:   Sun Jul 15 15:30:12 2018 +0200

    png-load: do not reinterpret gamma when using ICC profile

 operations/external/png-load.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/operations/external/png-load.c b/operations/external/png-load.c
index 22acc3a75..d71a710b2 100644
--- a/operations/external/png-load.c
+++ b/operations/external/png-load.c
@@ -346,6 +346,8 @@ gegl_buffer_import_png (GeglBuffer  *gegl_buffer,
     if (interlace_type == PNG_INTERLACE_ADAM7)
       number_of_passes = png_set_interlace_handling (load_png_ptr);
 
+    if (!space)
+    {
     if (png_get_valid (load_png_ptr, load_info_ptr, PNG_INFO_gAMA))
       {
         gdouble gamma;
@@ -356,6 +358,7 @@ gegl_buffer_import_png (GeglBuffer  *gegl_buffer,
       {
         png_set_gamma (load_png_ptr, 2.2, 0.45455);
       }
+    }
 
     png_read_update_info (load_png_ptr, load_info_ptr);
   }


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