Setting EXIF metadata with MagickSetImageAttribute?
Posted: 2006-08-04T03:49:33-07:00
[Apologies - I mis-posted this in the Developer forum]
I have a small test program which attempts to alter the "Model" EXIF tag:
It produces the following output:
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:
Any clues?
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..