2008-10-30 16:22:12 |
Tom Haddon |
description |
This bug was reported by Christopher Ellison <cjellison@ucdavis.edu>:
pyexiv2's internally cached metadata is not converted into the correct type although the data effectively written to the file is.
Here is an example interactive python session to reproduce:
------------
In [1]: import pyexiv2
In [2]: a = pyexiv2.Image('test.jpg')
In [3]: a.readMetadata()
In [4]: a['Iptc.Application2.Keywords']
Out[4]: ('3', '4')
In [5]: a['Iptc.Application2.Keywords'] = (5, 6)
In [6]: a.writeMetadata()
In [7]: a.readMetadata()
In [8]: a['Iptc.Application2.Keywords']
Out[8]: (5, 6)
In [9]:
Do you really want to exit ([y]/n)?
ellisocj@analytic:~/exif$ ipython
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[...]
In [1]: import pyexiv2
In [2]: a = pyexiv2.Image('test.jpg')
In [3]: a.readMetadata()
In [4]: a['Iptc.Application2.Keywords']
Out[4]: ('5', '6')
------------
Here the new multiple values of tag 'Iptc.Application2.Keywords' are correctly written as strings ('5', '6') but the internal cache, after setting them, holds them as integers (5, 6) as passed to the setter. |
pyexiv2's internally cached metadata is not converted into the correct type although the data effectively written to the file is.
Here is an example interactive python session to reproduce:
------------
In [1]: import pyexiv2
In [2]: a = pyexiv2.Image('test.jpg')
In [3]: a.readMetadata()
In [4]: a['Iptc.Application2.Keywords']
Out[4]: ('3', '4')
In [5]: a['Iptc.Application2.Keywords'] = (5, 6)
In [6]: a.writeMetadata()
In [7]: a.readMetadata()
In [8]: a['Iptc.Application2.Keywords']
Out[8]: (5, 6)
In [9]:
Do you really want to exit ([y]/n)?
someone@somewhere:~/exif$ ipython
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[...]
In [1]: import pyexiv2
In [2]: a = pyexiv2.Image('test.jpg')
In [3]: a.readMetadata()
In [4]: a['Iptc.Application2.Keywords']
Out[4]: ('5', '6')
------------
Here the new multiple values of tag 'Iptc.Application2.Keywords' are correctly written as strings ('5', '6') but the internal cache, after setting them, holds them as integers (5, 6) as passed to the setter. |
|