[Digikam-devel] Odp: XMP metadata and GPS support

Andreas Huggel ahuggel at gmx.net
Wed Jun 20 09:10:36 BST 2007

On Wednesday 20 June 2007 10:50, Andreas Huggel wrote:
> Would it help in the short term if Exiv2::Image provided some kind of
> getXmp/setXmp methods (at least for JPEGs) which would just deal with
> std::string BLOBs containing the raw XML? This would allow to
> read/write the data using Exiv2::Image::read/writeMetadata but
> require some other means to parse the XML.

FWIW, I've added Exiv2::Image::xmpPacket() which can be used to dump the 
XMP packet of JPEG images (APP1 XMP segment) and TIFF or related RAW 
images (IFD0 tag 700) as per the XMP specs. Read-only access for a 
start and no parsing of the XML yet.


Note that this is in branches/unstable only for now.

BTW, the XMP specs (p93) highlight that XMP in JPEGs suffers the same 
problem as Exif: 
"IMPORTANT: Following the normal rules for JPEG sections, the header 
plus the following data can be at most 65535 bytes long. The XMP Packet 
cannot be split across the multiple APP1 sections, so the size of the 
XMP Packet can be at most 65502 bytes."
And that's plain (UTF8) XML code, not even compressed.


More information about the Digikam-devel mailing list