I'm trying to drop a shadow to a composition of two images: one JPEG/PNG and one SVG vector. With the PNG image everything works seamlessly. Now, trying with the JPEG, I get a black background instead of the expected transparent background.
The command looks like this:
convert image.jpeg -background white -flatten \( -background none vector.svg \) -compose CopyOpacity -gravity center -composite \( \+clone -background \#111 -shadow 80x5\+5\+5 \) -background none -compose DstOver -flatten result_from_jpeg.png
We start from this JPEG:
or this PNG:
Then we compose the vector, that because is white, you'll not be able to see raw, so here it is with a grid below:
the real vector is this one: http://cl.ly/Xymi/vector.svg
An then we drop the shadow. Starting with the PNG we get it right (transparent background):
but with JPEG, the background is black instead:
All files can be downloaded here in a ZIP: http://cl.ly/Xz8V/Archive%202014-10-10%20at%2011.34.55%20am.zip
Any ideas of what could be happening? Thanks in advance!!
EDIT:
My version of IM:
Version: ImageMagick 6.8.8-9 Q16 x86_64 2014-03-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib freetype jng jpeg lcms ltdl png tiff xml zlib
I'm developing on Mac OSX.