How to dispaly the image without stretching with specific size
<p>I am developing one application. In that i want to display the image. And the available space is <code>1000X500</code>.
Now i have to check that image width and height more than that size or not. I did that one and if the size is more than <code>1000X500</code> then i set that image size to that size. </p>

<p>My problem is if that image size is less than <code>1000X500</code> then i want to increase the size of that image.If i increase the size then image will be stretched.So i want to increase the size and find-out the exact size for that image.</p>

<p>And set that image to that exact size.And also i have to maintain the aspect ratio.</p>
