I'm attempting to update image metadata using golang. The simplest way I've found to do this is simply running exiftool with os/exec, but for some reason this also creates a file that contains the original tags, called whatever the original file is called, plus "_original".
Simplified code is as follows:
func main() {
cmd := exec.Command("exiftool", "-ImageDescription=\"this should work???\"", "image.png")
err := cmd.Run()
if err != nil {
log.Fatal(err)
}
}
It does set the tags as expected, but creates an extra file called "image.png_original". As far as I can tell this has no reason to happen. I've checked documentation for os/exec as well as exiftool and haven't found anything.
While I could just delete the extra file, that's messy and I'm sure there's a better way that I just haven't been able to figure out.
Any help is appreciated :)