Page 1 of 1

Comment

Posted: 2017-02-26T12:25:45-07:00
by Bonzo
I tried a year or so ago without success to write a comment into an image using -comment with a V6 version and it is failing again with V7.

I found a thread: https://www.imagemagick.org/discourse-s ... nt#p141269 which fmw42 suggests using -set comment which does work.

Should -comment be removed from the list of options or a note needs adding about using -set comment instead on versions after a certain date?

Re: Comment

Posted: 2017-02-26T12:28:59-07:00
by fmw42
Put -comment before reading the image or use -set comment after reading the image.

Code: Select all

convert -comment "testing" rose: rose.png
convert rose.png -format "%c\n" info:
testing

Code: Select all

convert rose: -set comment "new test" rose.png
convert rose.png -format "%c\n" info:
new test

Code: Select all

magick rose: -set comment "new test" rose2.png
magick rose2.png -format "%c\n" info:
new test

Re: Comment

Posted: 2017-02-26T12:39:51-07:00
by Bonzo
Thank you fmw42 that is what I was doing wrong as I was adding the comment just before saving.