From ff221e679c2dd17be9cd55d3d980859d656bfccd Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 13 Jul 2010 22:20:15 +0200 Subject: [PATCH] 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. --- plug-ins/common/file-png.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c index e906951671..1099d24212 100644 --- a/plug-ins/common/file-png.c +++ b/plug-ins/common/file-png.c @@ -896,7 +896,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) {