PNG images fail to open, unrecognized format

For some reason I am now unable to view/edit PNG files. I've noticed the issue because some icons were missing but actually present on the file system. I can view the files using browser but fail to open using pinta, viewnior or gimp.

$ imginfo -f screenshot.png
unknown image format
cannot load image

I've tried to reinstall libpng but that didn't help. Any ideas what can I try?

I don't think imginfo is a good test, it is supplied by jasper which is a codec for JPEG. (Also i'm not having issues, and imginfo -f on a png file is failing for me with the same errors.)

Try running exiv2 screenshot.png does that correctly identify the image and png and give the size at least?

If you run gimp screenshot.png are there any interesting errors?

exiv2 seems to work correctly.

$ exiv2 screenshot.png
File name       : screenshot.png
File size       : 86902 Bytes
MIME type       : image/png
Image size      : 1339 x 761
screenshot.png: No Exif data found in the file

gimp is able to open it although produces errors, see below:

$ gimp screenshot.png                                                                                                                                                         
GEGL-geglmodule.c-Message: Module '/usr/lib/gegl-0.2/openraw.so' load error: libopenraw.so.7: cannot open shared object file: No such file or directory

** (gimp:11295): WARNING **: Pixbuf theme: Cannot load pixmap file /usr/share/themes/Greenbird/gtk-2.0/resize_grip.png: Couldn't recognize the image file format for file '/usr/share/themes/Greenbird/gtk-2.0/resize_grip.png'


(gimp:11295): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(gimp:11295): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(gimp:11295): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(gimp:11295): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(gimp:11295): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

So I've tried to install libopenraw as it was missing and the issue is fixed.
Thanks a lot for the tips.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by