title: Extend an image with transparent portion
body: <p>I am making and photo editor and displaying an image in pictureBox and I resize the image to fit in the pictureBox without effecting its ratio of sides.</p>
  
  <p>Example if the pictureBox is of size (400x400) and the image is of (800x600) i will resize it to (400x300) programatically. </p>
  
  <p>The problem is I want this image to be the size of (400x400) to cover complete pictureBox for this I want to add transparent part in my image to make it from (400x300) to (400x400)</p>
  
  <p>Snapshot of my image on the pictureBox
  <a href="https://i.stack.imgur.com/ucTR5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ucTR5.png" alt="enter image description here"></a></p>
  
  <p>In the image above my blue is my image and other part is remaining picturebox.</p>
  
  <p>Again I want image'size (blue one) to be equal to picturebox's size and the remaining part of picturebox is covered by transparent part of picture </p>
  
  <p>Note: I don't want to stretch my image but add transparent part</p>
  
  <p>thanks,</p>