After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589407 - eog refuse to open a PNG file which name is image.jpg
eog refuse to open a PNG file which name is image.jpg
Status: RESOLVED DUPLICATE of bug 490067
Product: eog
Classification: Core
Component: image viewer
2.26.x
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-22 16:53 UTC by Keywan Najafi Tonekaboni
Modified: 2009-11-26 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Keywan Najafi Tonekaboni 2009-07-22 16:53:43 UTC
EOG refuse to open a file, which has a different fileextension as it type is. It try top open a file named image.jpg as an JPG, even though the content is saved as PNG.

EOG shouldn't rely on filenames or "file-extensions" only. It should try to determine the filetype or do this at least, when the user push "Retry". 

Of course, it's a mistake somewhere else, when a file-extensions differs from it contents/type. But there should be assistance to users, especially when the solution it's so easy (ignoring the fileextensions and guessing the filetype by analysing the conents itself). 

I guess this bugs are related and could be solved with the same solution
#472975 #563264
Comment 1 Felix Riemann 2009-11-26 12:45:55 UTC
(In reply to comment #0)> 
> Of course, it's a mistake somewhere else, when a file-extensions differs from
> it contents/type. But there should be assistance to users, especially when the
> solution it's so easy (ignoring the fileextensions and guessing the filetype by
> analysing the conents itself). 
> 
It's not as easy as you think. To identify some image formats (TGA) you need to look at the end of the file, which requires caching the whole file in apps that load images by streaming (like eog). Which is one reason my patch in bug 490067 is not in already. Also sniffing slows things down quite a bit (see bug 495825).

> I guess this bugs are related and could be solved with the same solution
> #472975 #563264

#472975 is something different, #563264 is slightly related but fixing that is another story.
-----------------------------------------------------------------------------
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 490067 ***