"Delete Tags" action doesn’t work

Bug #703624 reported by Olivier Tilloy
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Phatch
Confirmed
Undecided
Unassigned
phatch (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Running phatch 0.2.7 on Ubuntu 10.10 (also tested with the same results from trunk), the "Delete Tags" action doesn’t seem to work. Whichever method I select (all, exif, iptc, one), the tags are not actually deleted from the images. The only visible change in metadata is the value of the "Exif.Image.Software" tag which is changed/set to "Phatch".

Revision history for this message
Olivier Tilloy (osomon) wrote :

The "Rename Tag" action doesn’t work either.

I investigated a bit and found out the cause of the issue: the core.pil.Photo object that is passed to the action’s apply(…) method has incomplete info, it only contains the basic information, not the metadata usually extracted with pyexiv2.

Here’s an example of the info object for an image while in the apply(…) method:

{'index': 1, 'imageindex': 1, 'orientation': 1, 'subfolder': u'', 'root': u'/home/osomon/temp', 'format': 'JPEG', 'folderindex': 1, 'repeatindex': 0, 'filename': u'smiley1', 'path': u'/home/osomon/temp/blah/smiley1.jpg', 'folder': u'/home/osomon/temp/blah', 'foldername': u'blah', 'type': u'jpg', 'dpi': 72, 'compression': 'none'}

The image in fact contains a lot more metadata (EXIF and IPTC).

I’ll try to understand where in the workflow this metadata should have been read but hasn’t.

Revision history for this message
Olivier Tilloy (osomon) wrote :

The branch linked (lp:~osomon/phatch/extract-all-metadata) fixes the issue for all actions that manipulate {EXIF,IPTC} metadata (and probably other types of actions too as a positive side effect).

The patch is intentionally minimal, from my limited understanding of the code base some re-architecturing may be needed to make it cleaner if it were to be merged upstream, but it does the job well.

It was written against the trunk (lp:phatch), but it also applies cleanly to the source package for 0.2.7-2 (in maverick and natty).

Please test, review, and consider for inclusion in Natty.

Olivier Tilloy (osomon)
Changed in phatch:
assignee: nobody → Olivier Tilloy (osomon)
status: New → In Progress
Changed in phatch (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
status: New → In Progress
Olivier Tilloy (osomon)
Changed in phatch:
status: In Progress → Confirmed
Changed in phatch (Ubuntu):
status: In Progress → Confirmed
Changed in phatch:
assignee: Olivier Tilloy (osomon) → nobody
Changed in phatch (Ubuntu):
assignee: Olivier Tilloy (osomon) → nobody
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.