[gegl] operations: Use png_get_valid()



commit 72e0e9f126ebc442406acb3eb94c6ac6cf6cf4be
Author: Martin Nordholts <martinn src gnome org>
Date:   Sun Oct 3 07:34:36 2010 +0200

    operations: Use png_get_valid()
    
    Use png_get_valid() instead of accessing members directly, which gives
    compile warnings due to deprecation.

 operations/external/png-load.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/png-load.c b/operations/external/png-load.c
index bfc6b59..9f0d210 100644
--- a/operations/external/png-load.c
+++ b/operations/external/png-load.c
@@ -181,7 +181,7 @@ gegl_buffer_import_png (GeglBuffer  *gegl_buffer,
     if (interlace_type == PNG_INTERLACE_ADAM7)
       number_of_passes = png_set_interlace_handling (load_png_ptr);
 
-    if (load_info_ptr->valid & PNG_INFO_gAMA)
+    if (png_get_valid (load_png_ptr, load_info_ptr, PNG_INFO_gAMA))
       {
         gdouble gamma;
         png_get_gAMA (load_png_ptr, load_info_ptr, &gamma);
@@ -298,7 +298,7 @@ static gint query_png (const gchar *path,
     *width = w;
     *height = h;
 
-    if (load_info_ptr->valid & PNG_INFO_tRNS)
+    if (png_get_valid (load_png_ptr, load_info_ptr, PNG_INFO_tRNS))
       color_type |= PNG_COLOR_MASK_ALPHA;
 
     if (color_type & PNG_COLOR_TYPE_RGB)



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