Issue when setting an empty title ...
Dear Geviv2 developers,
Python2 is getting to an end and I decided to migrate my code which was heavily using pyexiv2 to Python3 and gexiv2: https://github.com/kif/imagizer/tree/gexiv2
I noticed an annoying bug and spent almost a week to figure out that when one sets a comment to an empty string
exiv_object.set_comment(""), gexiv2 stores that there is no comment in one of those keys:
- Exif.Image.XPComment (3 others are possible according to the documentation, but I did not encounter them in my tests)
Here is the dump of "exiv2 -pa" of such file, only the interesting part:
Exif.Image.XPComment Byte 0 Exif.Thumbnail.Compression Short 1 JPEG (old-style)
When reading this back metadata, one ends with the title being set to the subsequent tag, here
JPEG (old style). In other example I had
Exif.Image.ImageDescription which was set empty
and reporting the camera manufacturer.
I also noticed it was not possible to delete directly the faulty tag using the
clear_tag method. I had to assign this tag to non empty comment and subsequently delete it to work-around this bug.
I am using the gexiv2 version available in Debian10, i.e. gexiv2 0.10.9-1
Thanks for your help,