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 337805 - f-spot doesn't read EXIF comments from imported file when "Write metadata to file" selected
f-spot doesn't read EXIF comments from imported file when "Write metadata to ...
Status: RESOLVED DUPLICATE of bug 357237
Product: f-spot
Classification: Other
Component: Metadata
CVS
Other All
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
: 346412 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-09 14:02 UTC by Ambrus Kaposi
Modified: 2006-09-24 04:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ambrus Kaposi 2006-04-09 14:02:26 UTC
Please describe the problem:
When editing a JPG file with EXIF metadata, F-Spot should read the comments from
the EXIF Image Data/UserComment tag.

Steps to reproduce:
1. Select "Write metadata to file" in Preferences panel
2. Import a x.jpg file to catalog
3. Add a comment to x.jpg by clicking on it twice (Now the metadata is stored in
the file itself - whenever you double-click it, you can read and edit your
comment, you can also view the comment with with other apps, like gthumb)
4. Delete x.jpg from catalog
5. Import x.jpg into catalog once more
6. edit x.jpg, and see that the comment text box is empty

Actual results:
see 6. step

Expected results:
in 6. step, the comment text box should be filled with the comment stored in
EXIF metadata

Does this happen every time?
yes

Other information:
Comment 1 Bengt Thuree 2006-04-10 04:31:48 UTC
F-Spot for the moment do not read any EXIF/IPTC/XMP tags at all from the Photo.
It just stores them there.
Hopefully this will be sorted out in the not to far future.

Also see 
bug #168323  (tag photos during import - places)
bug #321770  (tag photos during import)
bug #305775  (gps information)
Comment 2 Bengt Thuree 2006-05-18 06:29:42 UTC
The first import, did you link it or copy it to F-Spot?
The seond import, did you link it or copy it to F-Spot?

By default, F-Spot copies the File A from a location to ~/Photos/...
The file that is updated with Meta Information is the one under ~/Photos/...

When you delete from Catalog, you remove the reference to this file, but the file still exists under ~/Photos/... as well as under your original Import location.

When you import the file in step 5), if you import it from the original location, you will not see any new tags, since this file was never modified.
Comment 3 Bengt Thuree 2006-05-18 07:57:59 UTC
Should probably be merged with bug #342137
Comment 4 Ambrus Kaposi 2006-05-21 09:46:13 UTC
Answer: both imports I linked it to F-Spot.

F-Spot stores the comment in the EXIF UserComment field _and_ the database ~/.gnome2/f-spot/photos.db but reads it _only_ from the database. It could be merged with bug #342137 , but I think it's more important to fix this first because we have the "Write metadata to file" option in the Preferences panel, and that implies to the user that the metadata (the comment and the tags, which the user adds to the file while using F-Spot) will be stored in the file, not in some database in the home directory. It's stored there also, but it doesn't get read from there and that is the problem.
Comment 5 Bengt Thuree 2006-05-25 16:15:38 UTC
I filed a patch in bug #342137 that reads the comment field as well as F-Spot tags during import
Comment 6 Lluís Pàmies 2006-07-03 14:01:01 UTC
I've made a patch for this bug: http://bugzilla.gnome.org/show_bug.cgi?id=346412

This patch reads the image description when it is imported to f-spot.
Comment 7 Stephane Delcroix 2006-07-03 14:12:47 UTC
*** Bug 346412 has been marked as a duplicate of this bug. ***
Comment 8 Stephane Delcroix 2006-07-03 14:13:59 UTC
Here is the patch proposed by Lluis:

Hello all !

This is my first patch to f-spot, so excuse me if is not correct.

The patch lets you to use the previous image comment as a F-Spot description.
This is a new feature that I request some months ago, and I decided that it
could be done by myself.

Here the cvs diff output:

Index: src/FileImportBackend.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/FileImportBackend.cs,v
retrieving revision 1.35
diff -r1.35 FileImportBackend.cs
207a208,211
>                       // Set the existing file description
>                       // FIXME Maybe we can do that in Photo's constructor ...
>                       photo.ReadMetadataFromImage();
>
Index: src/PhotoStore.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/PhotoStore.cs,v
retrieving revision 1.95
diff -r1.95 PhotoStore.cs
522a523,533
>
>       public void ReadMetadataFromImage ()
>       {
>               FSpot.ImageFile img = FSpot.ImageFile.Create (DefaultVersionUri);
>               if (img is FSpot.JpegFile) {
>                       FSpot.JpegFile jimg = img as FSpot.JpegFile;
>                       description = jimg.Description;
>
>               } else if (img is FSpot.Png.PngFile) {
>                       FSpot.Png.PngFile png = img as FSpot.Png.PngFile;
>                       description = png.Description;
523a535,537
>               }
>       }
>

Thanks to all for f-spot !
Comment 9 Bengt Thuree 2006-09-24 04:23:56 UTC
Closing this one since XMP import is in CVS.
For some extra issues with Comments/Description/Title etc please see bug #357237

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