$img_path = '/images/prepods_img/'.$activeprepod->image;
$max_width = 200;
$max_height = 200;
list($width, $height) = getimagesize($img_path);
$ratioh = $max_height/$height;
$ratiow = $max_width/$width;
$ratio = min($ratioh, $ratiow);
$width = intval($ratio*$ratiow);
$height = intval($ratio*$ratioh);