Joel1
public php v1 · immutable $imgsize = getimagesize($targpath); $oldwidth = $imgsize[0]; $oldheight = $imgsize[1]; var_dump($oldwidth); var_dump($oldheight);if($oldheigth > $oldwidth){ $nw =(640*$oldwidth)/$oldheight; $nh = 640; $thumbnw =(160*$oldwidth)/$oldheight; $thumbnh = 160; }if($oldwidth > $oldheight){ $nh=(480*$oldheight)/$oldwidth; $nw = 480; $thumbnh=(120*$oldheight)/$oldwidth; $thumbnw = 120; }if($oldwidth == $oldheight){ $nh = 480; $nw = 480; $thumbnh= 120; $thumbnw = 120; }