mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
2b7ebd97fb
commit
ff221e679c
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue