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 622147 - Should switch to mime-type based image loading.
Should switch to mime-type based image loading.
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Import
GIT
Other Linux
: Normal normal
: 0.7.1
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks: 549297
 
 
Reported: 2010-06-20 04:19 UTC by ali
Modified: 2010-07-08 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Switch to mime-type based image loading. (13.33 KB, patch)
2010-07-08 18:03 UTC, Ruben Vermeersch
committed Details | Review

Description ali 2010-06-20 04:19:16 UTC
I tried the following with both jpeg and png images.

(1) Download a jpg or png image and open/import it to F-spot. It should work just fine, so far. Now exit F-spot.

(2)Remove the extension(s) from your image file(s)
(3)Now try to import/open the same file(s) to F-spot; it doesn't work.


Expectation:
Any file supported by F-Spot should open properly with regardless of whether it has a the proper file extension, no file extension, or a made-up file extension.
Comment 1 Maxxer 2010-06-20 06:47:42 UTC
probably related to bug 342288.
Comment 2 ali 2010-06-20 21:06:58 UTC
It is probably similar to the other bug, however this one describes the bigger picture, the more general problem:

F-spot should not pay attention to the extension of ANY file, but instead should look inside the file and figure out the type of file based on its contents and not its extension.
 
Maybe you can look in the code of "Eye of Gnome" http://projects.gnome.org/eog/ and see how it's done there because that problem does not occur in EOG.
Comment 3 Ruben Vermeersch 2010-06-20 22:36:53 UTC
This will be switched when we switch to content-type detection for choosing the correct loader.
Comment 4 Ruben Vermeersch 2010-07-08 18:03:42 UTC
Created attachment 165499 [details] [review]
Switch to mime-type based image loading.

The mime type is now used for detecting how to load an image.

A test to ensure that we load everything Taglib# supports is added.
Comment 5 Ruben Vermeersch 2010-07-08 18:04:14 UTC
Attachment 165499 [details] pushed as f680fd0 - Switch to mime-type based image loading.