JEFuller / Piexif

Exif manipulation with pure python script.
MIT License
12 stars 3 forks source link

Exif entries are being sorted on dump #8

Closed HerrMuellerluedenscheid closed 1 year ago

HerrMuellerluedenscheid commented 1 year ago

I don't think it's required to change the order exif entries when dumping. In some situations this is even unfavorable e.g. when calculating a checksum or hash of an image including the exif attributes.

davetapley commented 1 year ago

Makes sense to me.

I went digging to see why it was sorted: it came in on a commit with message "m" 😞

https://github.com/hMatoba/Piexif/commit/69cb3e06221aecd8d9550313d9668ab10c30c73c

HerrMuellerluedenscheid commented 1 year ago

Interesting commit message 😄 I can only speculate but I would assume that it dates back to python 2 when dicts where not ordered by default yet. I assume the author wanted to achive reproducible results when running the tests. Since python3 python dicts are sorted which makes this sorting obsolete. ... If that was his intention. We will never know....

Anyways, thanks for merging.