title: Resizing an border image as overlay over another image
body: <p>Using Imagemagick.</p>
  
  <p>Goal is to overlay an image A with an transparent border image B.</p>
  
  <p>The "main" image A has the following dimensions:</p>
  
  <pre><code>identify examples/1.jpg 
  examples/1.jpg JPEG 1936x1296 1936x1296+0+0 8-bit DirectClass 1.231MB 0.000u 0:00.000
  </code></pre>
  
  <p>The transparent border image B:</p>
  
  <pre><code>identify examples/images/rahmen/basic/frame.png 
  examples/images/rahmen/basic/frame.png PNG 3508x2480 3508x2480+0+0 8-bit DirectClass 60.8KB 0.000u 0:00.000
  </code></pre>
  
  <p>You can see that the border image is larger than the main image</p>
  
  <p>We use </p>
  
  <pre><code>composite -resize 1936x1296 \
  examples/images/rahmen/basic/frame.png \
  images/1.jpg \
  output.jpg
  </code></pre>
  
  <p>for generating the overlay.</p>
  
  <p>The resulting image has the border but the border image does not fill up the image border but instead it show up inside the original image.</p>
  
  <p><a href="http://s16.postimage.org/t3vfpv7lx/image.jpg" rel="nofollow">http://s16.postimage.org/t3vfpv7lx/image.jpg</a></p>
  
  <p>So how can I resize/downsize the border image to the exact dimensions of the main image
  using imagemagick?</p>