$src = ‘4.jpg‘;
list($width,$height) = getimagesize($src);
$im = imagecreatefromjpeg($src);
$panl = imagecreatetruecolor(100, 100);
imagecopyresampled($panl,$im,0,0,0,0,100,100,$width,$height);
imagedestroy($im);
header("content-type:image/jpg");
imagejpeg($panl);
imagedestroy($panl);
时间: 2024-10-17 06:00:48