GNOME Bugzilla – Bug 589407
eog refuse to open a PNG file which name is image.jpg
Last modified: 2009-11-26 12:45:55 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
(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 ***