Question about combining two operations involving padding
Posted: 2009-12-08T09:52:51-07:00
Hi all,
I'm having trouble combining a couple of operations, each of which involves some padding:
Command 1:
Command 2:
The first command takes a slice of an image, resizes it and then pads it. This then acts as an alpha mask during the second command, which also must be padded in order to line up properly.
My attempts at combining the commands so far have not been successfull, e.g.
The goal is to produce a 512x512 image that is transparent everywhere except the bottom, the input image (start.png) rests.
Images in above commands:
start.png
mask.png
final.png
Any ideas? I've spent some time reading the documentation on combining multiple commands (http://www.imagemagick.org/Usage/basics/#cmdline) and checked the forums, but have not been able to figure this one out yet.
Any help would be appreciated.
Thanks!
I'm having trouble combining a couple of operations, each of which involves some padding:
Command 1:
Code: Select all
convert \( -resize '113%' -crop 512x67+604+17 mask.png \) -gravity SouthWest -extent 512x512 output1.png
Code: Select all
convert start.png -gravity SouthWest -extent 512x512 output1.png -compose copy_opacity -composite -channel A -threshold 50% final.png
My attempts at combining the commands so far have not been successfull, e.g.
Code: Select all
convert start.png -gravity SouthWest -extent 512x512 \( -resize '113%' -crop 512x67+604+17 mask.png \) -compose copy_opacity -composite -channel A -threshold 50% final.png
Images in above commands:
start.png
mask.png
final.png
Any ideas? I've spent some time reading the documentation on combining multiple commands (http://www.imagemagick.org/Usage/basics/#cmdline) and checked the forums, but have not been able to figure this one out yet.
Any help would be appreciated.
Thanks!