Comment

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Comment

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Comment

Post 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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Comment

Post by Bonzo »

Thank you fmw42 that is what I was doing wrong as I was adding the comment just before saving.
Post Reply