Write to multiple destination paths

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
string_theorist
Posts: 5
Joined: 2013-04-30T00:27:12-07:00
Authentication code: 6789

Write to multiple destination paths

Post by string_theorist »

Hello,

Is there a way to create one image using convert.exe, in multiple destinations?

I am using the latest build, running through a batch script on Windows 7.

Thanks for your help.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Write to multiple destination paths

Post by snibgo »

You can write an output almost anywhere in the command line:

Code: Select all

convert in.png {blah blah} -write a.png -write b.jp2 -write c.tiff d.jpg
Is that what you want?
snibgo's IM pages: im.snibgo.com
string_theorist
Posts: 5
Joined: 2013-04-30T00:27:12-07:00
Authentication code: 6789

Re: Write to multiple destination paths

Post by string_theorist »

Thanks for your reply! That helps a lot.

Cheers!
string_theorist
Posts: 5
Joined: 2013-04-30T00:27:12-07:00
Authentication code: 6789

Re: Write to multiple destination paths

Post by string_theorist »

ok, so i tried the above mentioned suggestion.

this is the code:

%imageMagickPath%\convert.exe -background blue -font C:\Windows\Fonts\ebrimabd.ttf -fill white -strokewidth 2 -stroke black -pointsize 40 -size 640X480 -gravity South caption:"%%o\n%%p" -write "%backUpDestPathUNC%\DSC00%%q.jpg" -write "%cardDestPath%\DSC00%%q.jpg"

the problem may be that i am using the "caption:" sub command.

what happens is that the first -write command works. while the second returns the error:

convert.exe: option requires an argument `-write' @ error/convert/ConvertImage Command/3085.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Write to multiple destination paths

Post by fmw42 »

the last output should not have -write before it. Or add null: to the end of the command
string_theorist
Posts: 5
Joined: 2013-04-30T00:27:12-07:00
Authentication code: 6789

Re: Write to multiple destination paths

Post by string_theorist »

Sweet! Thanks for your help. Solved :D
Post Reply