← Back to team overview

pyexiv2-developers team mailing list archive

Re: pyexiv2 0.2 testing

 

Hey Damien,

Damien Moore a écrit :
> Hi Olivier
> 
> [...]
> 
>>(including the long-awaited XMP metadata)
> 
> Another welcome change, but one I have a question about. Does the XMP
> support just allow reading/writing that metadata from the image binary
> or is there support for reading/writing sidecars as well?

It fully supports reading from sidecar files, but apparently has a
problem writing back the modified data. To be honest that's something I
hadn't tested before, and I don't really know how exiv2 behaves in this
regard.
I've simply tested with the StaffPhotographer-Example.xmp file that
comes with the test data in exiv2 trunk (can be downloaded at
http://dev.exiv2.org/repositories/changes/exiv2/trunk/test/data/StaffPhotographer-Example.xmp),
here is what I've done:

import pyexiv2
m = pyexiv2.ImageMetadata('StaffPhotographer-Example.xmp')
m.read()
# At this point metadata is correctly read and accessible, e.g.:
m['Xmp.dc.creator'].value # returns [u'John Doe']
# Changing the value:
m['Xmp.dc.creator'].value = [u'Clark Kent']
# And writing back to the file
m.write()

This raises no error, however when inspecting the file afterwards, the
value for Xmp.dc.creator is still 'John Doe'.
I'm not sure how to interpret that, it looks like a bug to me. Would
that be a show-stopper for you?

> cheers,
> Damien

Cheers,

Olivier



Follow ups

References