I have a small test program which attempts to alter the "Model" EXIF tag:
Code: Select all
def main () {
local wand = NewMagickWand()
MagickReadImage(wand, info("argv 1"))
print(MagickGetImageAttribute(wand, "EXIF:Model"))
MagickSetImageAttribute(wand, "EXIF:Model", "TEST")
print(MagickGetImageAttribute(wand, "EXIF:Model"))
MagickWriteImage(wand, "/tmp/tst.jpg")
DestroyMagickWand(wand)
}
Canon DIGITAL IXUS..
TEST
So it seems that the attribute is being set in the wand.
However, the output image /tmp/tst.jpg still gives Canon DIGITAL IXUS when I query it using an Exif utility.
Similarly, I can't seem to set EXIF metadata with the convert command line tool:
Code: Select all
% identify -format "%[EXIF:Model]" canon-ixus.jpg
Canon DIGITAL IXUS..
% convert canon-ixus.jpg -set "EXIF:Model" TEST /tmp/tst.jpg
% identify -format "%[EXIF:Model]" /tmp/tst.jpg
Canon DIGITAL IXUS..
% convert canon-ixus.jpg -set "[EXIF:Model]" TEST /tmp/tst.jpg
% identify -format "%[EXIF:Model]" /tmp/tst.jpg
Canon DIGITAL IXUS..