Eye of GNOME does not load JPG


I tried to open a JPG image file using Eye of GNOME. It failed with this error:

Could not load image 'foo.jpg'
Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)

When I opened the same file using another image viewer, it opened without any problem!

Another symptom of this problem is that the thumbnail of the image file is not displayed in Nautilus or in Nemo file explorers. All of these programs use the same backend for image display.


This problem is typically caused when the image is actually a PNG file. Some apps on Android are notorious for saving all image formats as JPG.

As noted by EOG, the file starts with the magic identifier 0x89 0x50, which is for PNG format. You can also check the same by using the file command:

$ file foo.jpg
foo.jpg: PNG image data, 716 x 960, 8-bit/color RGB, non-interlaced

We can see that file reports this JPG file as containing PNG image data.

Just rename the JPG file with the correct .png file extension and EOG will open it correctly. You will also see that thumbnails are now rendered correctly.

Admittedly, EOG could have detected the format correctly and shown a more informative error message. I have seen other image viewers do that. This has been filed as a bug here.

Tried with: Eye of GNOME 3.10.2 and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.