[gimp/gimp-2-6] Bug 624275 - Image saved from google docs generates a 'gimp-image-set-resolution' error message



commit d8d734a1a81dce5cb6a38697f64e82424104bbae
Author: Sven Neumann <sven gimp org>
Date:   Tue Jul 13 22:20:15 2010 +0200

    Bug 624275 - Image saved from google docs generates a 'gimp-image-set-resolution' error message
    
    Only set the image resolution if the resolution in the PNG file
    is greater than zero.
    (cherry picked from commit ff221e679c2dd17be9cd55d3d980859d656bfccd)

 plug-ins/common/file-png.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 8ac2fb0..d42afff 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -897,7 +897,8 @@ load_image (const gchar  *filename,
       png_uint_32  yres;
       gint         unit_type;
 
-      if (png_get_pHYs (pp, info, &xres, &yres, &unit_type))
+      if (png_get_pHYs (pp, info,
+                        &xres, &yres, &unit_type) && xres > 0 && yres > 0)
         {
           switch (unit_type)
             {



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