I used libexif to read and modify the exif metadata in JPEG file. I am not sure on how to write/save the modified contents in the original source image file?
Any ideas?? Thanks.
For JPEG you can use libjpeg from libexif/exif repo.
libjpeg
libexif/exif