title: Black background (instead of transparent) after drop shadow in ImageMagick
body: <p>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.</p>
  
  <p>The command looks like this:</p>
  
  <p><code>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</code></p>
  
  <p>We start from this JPEG:</p>
  
  <p><img src="https://cl.ly/XyzN/image.jpeg" alt="image.jpeg"></p>
  
  <p>or this PNG:</p>
  
  <p><img src="https://cl.ly/XyjF/image.png" alt="image.png"></p>
  
  <p>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:</p>
  
  <p><img src="https://cl.ly/Xyb8/vector_over_grid.png" alt="vector_over_grid.png"></p>
  
  <p>the real vector is this one: <a href="http://cl.ly/Xymi/vector.svg" rel="nofollow noreferrer">http://cl.ly/Xymi/vector.svg</a></p>
  
  <p>An then we drop the shadow. Starting with the PNG we get it right (transparent background):</p>
  
  <p><img src="https://cl.ly/XzT5/result_from_png.png" alt="result_from_png.png"></p>
  
  <p>but with JPEG, the background is black instead:</p>
  
  <p><img src="https://cl.ly/XyXY/result_from_jpeg.png" alt="result_from_jpeg.png"></p>
  
  <p>All files can be downloaded here in a ZIP: <a href="http://cl.ly/Xz8V/Archive%202014-10-10%20at%2011.34.55%20am.zip" rel="nofollow noreferrer">http://cl.ly/Xz8V/Archive%202014-10-10%20at%2011.34.55%20am.zip</a></p>
  
  <p>Any ideas of what could be happening? Thanks in advance!!</p>
  
  <p>EDIT:</p>
  
  <p>My version of IM:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I'm developing on Mac OSX.</p>