title: Imagemagick command line, combine two different sized images
body: <p>I'd like to use "convert" (or whatever) from Imagemagick to combine two different sized images. I'd like them to be aligned at the bottom left corners. For example, I have two images:</p>
  
  <p>trans_alpha.png (a transparent 42x37 blank image)
  and shadow.png (a 68x23 image, which I want overlaid on trans_alpha.png aligned at the bottom left)</p>
  
  <p>The result I'd like would be a 68x37 image, <em>NOTE</em> these sizes are examples only, I don't want to put the size into the command line, I just want to use the sizes from the input images.</p>
  
  <p>I have tried a lot of combinations without success:</p>
  
  <p>Attempt no. 776 (close, but aligned to top left, not bottom left)..:</p>
  
  <pre><code>convert trans_alpha.png -background none shadow.png -gravity SouthWest -layers merge  +repage result.png
  </code></pre>
  
  <p>Attempt no. 841 (aligned correctly, but result image isn't wide enough)...</p>
  
  <pre><code>convert trans_alpha.png shadow.png -gravity SouthWest -composite result.png
  </code></pre>
  
  <p>Hopefully that makes sense.
  Thanks,</p>
  
  <p>Paul</p>