/ Published in: PHP

This function will return the height and width of an image that will change if the height/width is greater than the maximum supplied width and height.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function sizeme($img){ $maxx=400; $maxy=300; if($width>$maxx){ $newwidth = $maxx; } else { $newwidth=$width; $newheight=$height; } if($newheight>$maxy){ $newheight1=$maxy; } else { $newheight1=$newheight; $newwidth1=$newwidth; } return $out; }
Comments
