-strip erroneously overrides -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
ramalama

-strip erroneously overrides -comment

Post by ramalama »

if i do

convert -strip -comment "hello" a.jpg b.jpg

then the "hello" comment is not included in b.jpg.

-strip thus seems to override my -comment option.

this seems wrong.

-strip should remove all OLD meta data included in a.jpg
-comment should add my comments to b.jpg

can this please be fixed for the next release?

any workarounds for the current version would be appreciated.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -strip erroneously overrides -comment

Post by magick »

Try this command to retain the image comment:
  • convert a.jpg -strip -set comment "hello" b.jpg
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: -strip erroneously overrides -comment

Post by anthony »

Simpley put, read in the image first, and do things in the order wanted.

This could be called the motto of IM version 6
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
ramalama

Re: -strip erroneously overrides -comment

Post by ramalama »

brilliant. i was not aware of the "-set" option, as it was not listed in my outdated manual file. thanks!
Post Reply