hMatoba / piexifjs

Read and modify exif in client-side or server-side JavaScript.
MIT License
572 stars 119 forks source link

Fix multiple Exif APP1 markers on piexif.insert() #44

Closed kratico closed 6 years ago

kratico commented 6 years ago

This PR fixes multiple APP1 Exif markers.

I was able to reproduce the issue using a 360 GoPro Fusion picture. For some reason GoPro Fusion was adding 2 APP1 markers: the first for XMP tags and the second for EXIF tags.

After executing piexif.insert() there were 3 APP1 markers

With this PR, after executing piexif.insert() the result is

hMatoba commented 6 years ago

Thank you! I'll check in a few days.