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 479985 - Store comments in extended attributes
Store comments in extended attributes
Status: RESOLVED DUPLICATE of bug 313579
Product: gthumb
Classification: Other
Component: general
2.10.x
Other All
: Normal enhancement
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2007-09-24 21:37 UTC by Sven Anders
Modified: 2007-12-06 11:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sven Anders 2007-09-24 21:37:41 UTC
If available you should store comments in the filesystem's extended attributes and not in the ".comments" subdirectory.
Extended attributes are now a standard feature.
Comment 1 Michael Chudobiak 2007-12-05 12:54:39 UTC
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 313579 ***
Comment 2 Sven Anders 2007-12-05 13:12:49 UTC
I took a look at 313579.

What do we do, if the image format does not support EXIF (or IPTC) tags?
We will still need to store the comments somewhere. Normally I think
the program should fall back to a file based storage (the .comments subdir).
But here I think we should use the extended attributes (if available) instead!!
Comment 3 Michael Chudobiak 2007-12-05 13:18:17 UTC
What is the advantage of using extended attributes, instead of the .comments subdir?

- Mike


Comment 4 Sven Anders 2007-12-05 13:57:53 UTC
If you move, copy or delete the file you'll do the same to the extended attributes.

It's like the EXIF/IPTC tags attached to the file, but not in the image format but  as additional data to the file. As an advantage you can store any data in your own format...
Comment 5 Sven Anders 2007-12-05 14:18:38 UTC
It should be easy (but I do not know the whole framework).
The necessary library is available at "http://acl.bestbits.at/", but should
be available by default on any current distribution.
I think you will only need these three system calls:
  setxattr, getxattr and removexattr

Comment 6 Michael Chudobiak 2007-12-05 14:33:35 UTC
Sven,

I hope to use exempi to store the metadata in XMP fields, instead of exif, iptc, or xml files. Other applications can share the metadata easily then.

- Mike
Comment 7 Sven Anders 2007-12-05 14:47:37 UTC
Fine. This will be future-proof and I think the correct direction.

But:

 1. This will reduce compatibility with older image programs, which
    do not support XMP yet.
    (If the meta-data framework is generic, it should be possible to
     write standard data in the other formats too.)

 2. It does not solve the problem, if a the image format does not
    support XMP at all. Where do you want to store metadata in GIF,
    PNG, TIFF or TGA files?
    (A easy solution would be to store the XMP data in an extended
     attribute :-) )

- Sven
Comment 8 Michael Chudobiak 2007-12-05 14:59:51 UTC
Well, no other programs know how to use gthumb xml comment files, and no other programs would know how to use the extended attributes, so using XMP would be an increase in compatibility.

XMP can be applied to jpg, tiff, png, and gif files. (I don't know about tga).

The comment code will have to juggle and prioritize exif / iptc / xmp / xml data.  Adding extended attributes at this point would just make it even messier.

- Mike


Comment 9 Sven Anders 2007-12-05 15:28:42 UTC
> Well, no other programs know how to use gthumb xml comment files, and no other
> programs would know how to use the extended attributes, so using XMP would be
> an increase in compatibility.

Correct, but I was speaking of other programs that do only support EXIF and IPTC,
and not XMP.

> XMP can be applied to jpg, tiff, png, and gif files. (I don't know about tga).

How is this data stored? In the standard comment flags of each format?

> The comment code will have to juggle and prioritize exif / iptc / xmp / xml
> data.  Adding extended attributes at this point would just make it even
> messier.

XMP is stored in XML, so if you cannot store the data in the image format itself, you would just save it in the extended attribute. I think you did not need a special format for this. And the XMP format should have all (interesting) field, so you should not need the additional data in the EXIF and IPTC tags.
(Isn't the XMP in some way the successor of the IPTC format?=
Comment 10 Michael Chudobiak 2007-12-05 15:41:22 UTC
> Correct, but I was speaking of other programs that do only support EXIF and
> IPTC, and not XMP.

I don't understand - what are you suggesting we do? That these programs can't read XMP, but they could use extended attributes? Or something else?

 
> How is this data stored? In the standard comment flags of each format?

I don't know the details, but it is explained here: http://www.adobe.com/devnet/xmp/pdfs/xmp_specification.pdf, page 91.


> XMP is stored in XML, so if you cannot store the data in the image format
> itself, you would just save it in the extended attribute.

No, you are supposed to store it in a "sidecar" file. (If your image is xyz.jpg, you can store the XMP data in xyz.xmp, and a good program should recognize that.) See page 36 of the above XMP standard.

I'm not an expert on XMP (so your comments are most welcome) but that is my understanding of it...


- Mike

Comment 11 Sven Anders 2007-12-06 11:52:13 UTC
> I don't understand - what are you suggesting we do? That these programs can't
> read XMP, but they could use extended attributes? Or something else?

Oh, sorry we mixed it up.
Other programs support only EXIF and IPTC, so do not only support XMP. This was
a general hint/advice, it has nothing to do with the extended attributes.

> No, you are supposed to store it in a "sidecar" file. (If your image is
> xyz.jpg, you can store the XMP data in xyz.xmp, and a good program should
> recognize that.) See page 36 of the above XMP standard.

Ok, I wasn't aware, that it's in the spec. The advantage still would be, that
the extended attributes are tight-knit to the real file. But as this isn't in
XMP spec and XMP support most of the formats, I think it's not really necessary to support it yet.
Maybe I should propose it as an extension to XMP?! ;-)