Discard original image when making shadow
Posted: 2015-12-10T11:46:52-07:00
I'm trying to use `convert` to generate glow images for a game we are working on.
I've got most of the command done already
The issues is that outputs `output-0.png` and `output-1.png`, where I need `output-0.png` to really be `output.png`.
I know I can just use anything to remove the unnecessary `output-1.png` and rename the other file, but is there a way to do this in imagemagick?
Using `-layers merge` allows the original image to seep through, which we don't want and will make the file size larger.
I've got most of the command done already
Code: Select all
[ ! -f input.png ] && curl -L http://bellard.org/bpg/2.png --output input.png
convert \
input.png \
-background none \
\( +clone -background \#f0f -shadow 100x40 -channel A -level 0,70% +channel \) \
-background none \
+swap \
+repage \
-shave 80 \
output.png
I know I can just use anything to remove the unnecessary `output-1.png` and rename the other file, but is there a way to do this in imagemagick?
Using `-layers merge` allows the original image to seep through, which we don't want and will make the file size larger.