linuxmint / xviewer

A generic Image viewer
GNU General Public License v2.0
75 stars 37 forks source link

Unable to open certain PNG image #109

Closed Betalord closed 4 years ago

Betalord commented 4 years ago
 * Xviewer version: 2.6.2
 * Distribution: Mint 20

Xviewer is unable to open PNG image from here: https://www.itl.cat/wallview/ibTiohT_sandwich-harbour-namibia/ (file name: itl.cat_desert-wallpaper_2905901.png) It says: Could not load image '...'. Fatal error reading PNG image file: Not a PNG file

Note however, that all other programs open it without a problem, also a preview thumbnail is created in file explorer under Mint, so it is definitely a valid PNG file.

Steps to reproduce Download the image from above url, open it with Xviewer.

leigh123linux commented 4 years ago

The file is a .jpeg

$ file itl.cat_desert-wallpaper_2905901.png 
itl.cat_desert-wallpaper_2905901.png: JPEG image data, JFIF standard 1.01, resolution (DPI), density 96x96, segment length 16, comment: "CREATOR: gd-jpeg v1.0 (using IJG JPEG v80), quality = 97", progressive, precision 8, 3840x2400, components 3

You will need to rename the file extension to .jpg or .jpeg

Betalord commented 4 years ago

Wouldn't it be possible for the program to detect such things automatically? Every other program does it, I think Xviewer should do it too since it is a pretty easy thing to do (you need to see the header and figure out what type it is). Would make Xviewer a bit more "professional" in my opinion.

leigh123linux commented 4 years ago

Wouldn't it be possible for the program to detect such things automatically? Every other program does it, I think Xviewer should do it too since it is a pretty easy thing to do (you need to see the header and figure out what type it is). Would make Xviewer a bit more "professional" in my opinion.

Gnome image viewer (eog) doesn't recognize it either.