title: iTextSharp: How to resize an image to fit a fix size?
body: <p>I want to be able to resize an image to the dimension of 159x159 points, using iTextSharp 4.2.0, but the resulting image need to have exactly the dimensions specified.</p>
  
  <p>I've tried this:</p>
  
  <pre><code>Image image = Image.GetInstance(imagePath);
  image.ScaleAbsolute(159f, 159f);
  </code></pre>
  
  <p>But the image is not a square. It keeps the aspect ratio.</p>
  
  <p>Example:
  I have this image:</p>
  
  <p><img src="https://i.stack.imgur.com/Qs0ZV.png" alt="enter image description here"></p>
  
  <p>And the result image should look loke this:</p>
  
  <p><img src="https://i.stack.imgur.com/BXufq.png" alt="enter image description here"></p>
  
  <p>Thanks.</p>