Position asset in chain.

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
weblife
Posts: 21
Joined: 2016-01-06T22:23:33-07:00
Authentication code: 1151

Position asset in chain.

Post by weblife »

My Version: ImageMagick 6.9.1-10 Q16 x86_64 2015-07-26
Platform: Mac OSX El Capitan 10.11.6

Having trouble finding a way that would reposition layer 0 via -geometry -repage before placing it on underlay...

How can I keep this as one command to position the edits made to artwork.png and resize and position before merging down?

Code: Select all

convert \
\( artwork.png -gravity center -extent 2000x2000 -fuzz 9% -transparent white \)          \
alpha.png -gravity center -alpha On -compose copy_opacity -composite                     \
-fuzz 9% -transparent white -thumbnail 1900x1900 -repage -400+0 -compose DstOver         \
underlay.png altered.png
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Position asset in chain.

Post by snibgo »

The end of your command probably doesn't do what you want.

"-compose DstOver" is a setting, but isn't followed by anything that uses the setting.

Before you write the output "altered.png", you read another input, "underlay.png". So there will be two outputs.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Position asset in chain.

Post by fmw42 »

Perhaps you mean (?)

Code: Select all

convert \
\( artwork.png -gravity center -extent 2000x2000 -fuzz 9% -transparent white \)          \
alpha.png -gravity center -alpha On -compose copy_opacity -composite                     \
-fuzz 9% -transparent white -thumbnail 1900x1900 -repage -400+0                          \
underlay.png -compose DstOver -composite altered.png
At least that has proper syntax and will produce 1 output (as per what snibgo wrote above)
Post Reply