if ($makethumb) { $image = call_user_func("imagecreatefrom".$types[$imagedata[2]], $image); $thumb = imagecreatetruecolor ($x, $y);