Unreliable exif metadata handling with 'piexif' and 'py3exiv2' hard to find on my distro !
Using python-piexif package on Arch/Manjaro:
When I rotate the image by 90° with < and save it with :w I get heavy issues with the pictures of different cameras.
For the images of one camera (One Plus 7 Pro) I get the following error in console:
[00:20:06] WARNING <imutils.metadata> The following plugins failed to copy metadata: piexif<br>
Some metadata may be missing in the destination image /tmp/tmpfglrneuo.jpg.
and in fact a lot of metadata is lost, like GPS, camera specifcs, etc....
For the images of another camera (Samsung Note 4 SM-N910F) I get NO errors in console. BUT all camera specific metadata is gone, too!
And the alternative py3exiv2 is unavailable on Arch/Manjaro official packages and can neither be found on the AUR. If I try to use pip install py3exiv2 I get a warning that I could break my whole python environment with my system.
How is the workflow supposed to be used here? This is very dangerous, as I could accidentally get rid of all my metadata!
Why isn't it possible to just maintain the metadata unchanged as a default behavior? This would be so much better than relying on unreliable or unavailable external tools, that silently delete my metadata, when i just rotate images. If none of these two plugins is installed, the metadata just gets erased and I'm warned afterwards, too, not beforehand.
If more info is needed, I'm happy to help. Maybe the metadata diffs, etc...
Okay, I tried again searching in AUR and it looks like python-exiv2 is the one that installs 'py3exiv2' on my system, NOT python-pyexiv2.
With python-exiv2 installed I've tested several pictures from different cameras and the metadata is maintained as expected.
So for anyone affected, this information might be useful.
But it would still be great to have a copying or warning default behavior before metadata is lost, to avoid these user accidents.
And the alternative py3exiv2 is unavailable on Arch/Manjaro official packages and can neither be found on the AUR.
I don't know about Arch, but on Linux Mint / Ubuntu I had to install these packages:
sudo apt install python3-piexif python3-py3exiv2
If I try to use pip install py3exiv2 I get a warning that I could break my whole python environment with my system.
Try pipx instead.