PHP: image size help me out

Posted by Karem on Stack Overflow See other posts from Stack Overflow or by Karem
Published on 2011-01-09T15:47:31Z Indexed on 2011/01/09 15:53 UTC
Read the original article Hit count: 192

Filed under:

Yes following from this:

PHP: if more than ..px resize to..

As you can see it resizes if:

if($width > 604 && $height > 453) {

This works fine..

Although what if $width is over 604, and $height is under 453.. eg: 604x300, then this will skip the resize procedure..and same contrary(width is under, height is over). Also, if the dimensions on a picture is 500x900, and it gets resized, it gets really ugly resized. any great fix?

Any good suggestion on how I should handle this please?

© Stack Overflow or respective owner

Related posts about php