How to resize a image in php to fit it into a box of custom size preserving its aspect ratio?
<p>I have a image of 400 by 350 pixels. I ve to fit it into a box of 90px by 80px. Whenever i resize it using this code:</p>

<pre><code>          ****************** Create Thumbnails *************************************/
    $imageEditor = new ImageEditor($image_name, $path);
    $imageEditor-&gt;resize(90, 80);
    $imageEditor-&gt;outputFile($image_name, $paththumbnail);
    $imageEditor-&gt;outputFile();
      **************************************************************************/
</code></pre>

<p>the output image is smaller in case of height  while preserving aspect ratio.
How can i get the exact image resize?</p>
