Tag values are written twice

Bug #582733 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyexiv2
Fix Released
High
Olivier Tilloy

Bug Description

This is a code issue that impairs the performances when writing the value(s) of a tag which has been read from an image. Note that it doesn't happen for a new tag which has been added to an image (as explained below).
Note also that there is no known functional impact other than the performance issue.

Example code path for an EXIF tag (similar issue for IPTC and XMP tags):
When the value of a tag is set, tag._set_raw_value(...) is called, which in turn calls self._tag._setRawValue(...), which writes the value of the tag in the corresponding ExifData object (first write). Then, since the tag belongs to an image, its metadata member exists, and thus self.metadata._set_exif_tag_value(...) is called, which in turn calls self._image._setExifTagValue(...), which writes the data for the second time.

Note that when first creating a tag (with or without a value), then adding it to an image, since the private _data attribute of the underlying exiv2wrapper::ExifTag _tag is not changed to point to the ExifData of the image (this is a bug!), writing twice the data is actually needed.

Olivier Tilloy (osomon)
Changed in pyexiv2:
status: Confirmed → In Progress
Olivier Tilloy (osomon)
Changed in pyexiv2:
status: In Progress → Fix Committed
Olivier Tilloy (osomon)
Changed in pyexiv2:
milestone: none → 0.2.2
Olivier Tilloy (osomon)
Changed in pyexiv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.