title: Expand canvas/transparent background in BitmapImage in a WPF app
body: <p>This is a follow up question on <a href="https://stackoverflow.com/questions/4648456/save-image-to-file-keeping-aspect-ratio-in-a-wpf-app">Save image to file keeping aspect ration in a WPF app</a></p>
  
  <p>I know howto scale the image, but how do I expand the canvas size, to ensure the image still has the requested width and height. In this example its 250x250 but its dynamic.</p>
  
  <p>I have created this illustration to show what I'm trying to accomplice.
  <img src="https://i.stack.imgur.com/RVxlW.png" alt="alt text"></p>
  
  <p>I can't find any way of expanding the canvas of an BitmapImage, nor a way to create an in  memory image in the correct size, with a transparent background, and then merging the two images together. </p>