Multiple labels in one command

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
utbl
Posts: 18
Joined: 2016-09-22T01:53:33-07:00
Authentication code: 1151

Multiple labels in one command

Post by utbl »

How can I create multiple label commands (with specific option) into one convert command.

For example these commands into one:

Code: Select all

convert -size 500x500 -font Helvetiva -pointsize 20 label:"test1" test.png
convert -size 500x500 -font Helvetiva -pointsize 20 label:"test2" test.png
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Multiple labels in one command

Post by GeeMack »

utbl wrote:How can I create multiple label commands (with specific option) into one convert command.
A command like this will create two labels, one with each of your "test1" and "test2" words, with output files named "test-0.png" and test-1.png"...

Code: Select all

convert -size 500x500 -font Helvetiva -pointsize 20 label:"test1" label:"test2" test.png
A command like this will create the same two labels, but they'll be named "onetest.png" and "anothertest.png"...

Code: Select all

convert -size 500x500 -font Helvetiva -pointsize 20 ^
   label:"test1" -write onetest.png +delete ^
   label:"test2" anothertest.png
The above is for DOS. for Unix replace the ^ with \
Post Reply