title: image Scaling of picture box
body: <p>i got a problem with image scaling in C#.</p>
  
  <p>I have a picture Box with given Size : e.g. width = 800px height = 600px</p>
  
  <p>I am loading different images into that picture box, small ones ( 400x400) and big ones (800+ x 600+)</p>
  
  <p>My images are getting resized if they do not fit into box. But they are <em>always</em> resized to MAX width and height of PictureBox. So the aspect ratio is <em>destroyed</em>.</p>
  
  <p>Can anybody help to identify / fix the problem?</p>
  
  <p><strong>Classes:</strong></p>
  
  <p><a href="http://pastie.org/private/nlpczwuokemq4jwedulw" rel="noreferrer">Form1.cs</a></p>
  
  <p><a href="http://pastie.org/private/0fjxxktybiafuwu2glg0a" rel="noreferrer">ImageHandling.cs</a> (commented out)</p>
  
  <p><a href="http://pastie.org/private/7h40w2eg5wvja8uohhyflq" rel="noreferrer">ImageUtilities.cs</a></p>
  
  <p><strong>Examples:</strong></p>
  
  <p>Problem 1:
  My Version<br>
  <img src="https://i.stack.imgur.com/kjjPS.jpg" alt="enter image description here">  </p>
  
  <p>vs 
  Original Source <img src="https://i.stack.imgur.com/luwRh.jpg" alt="enter image description here"></p>
  
  <p>Problem 2:<br>
  My Version<br>
  <img src="https://i.stack.imgur.com/7EK8g.jpg" alt="enter image description here"></p>
  
  <p>vs 
  Original Source<br>
  <img src="https://i.stack.imgur.com/pLTsd.jpg" alt="enter image description here"></p>
  
  <p><strong>How i want it:</strong></p>
  
  <p>Solution<br>
  <img src="https://i.stack.imgur.com/OQx0d.jpg" alt="enter image description here"></p>