Make an image fit in a rectangle.

Posted by Martijn Courteaux on Stack Overflow See other posts from Stack Overflow or by Martijn Courteaux
Published on 2010-04-29T19:08:34Z Indexed on 2010/04/29 19:27 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

Hi,

If I have an image of which I know the height and the width, how can I fit it in a rectangle with the biggest possible size without stretching the image.

Pseudo code is enough (but I'm going to use this in Java).

Thanks.

© Stack Overflow or respective owner

Related posts about image

Related posts about rectangle