-
-
header("Content-type: image/png");
$temp_width = 150;
- $temp_height = 180;< ;/p>
$img_path = "test.jpg";
- $img_path2 = "test2.jpg";
$im = @imagecreatefromjpeg($img_path);< /p>
$temp_img=imagecreatetruecolor($temp_width,$temp_height);
- imagecopyresampled($temp_img,$im,0,0,0,0,$temp_width,$temp_height,$temp_width,$temp_height);
- //echo $temp_img;
- //imagejpeg($temp_img);
- imagepng($im,$img_path2);
/*
- imagecopyresize($temp_img,$im,0,0 ,0,0,$temp_width,$temp_height,$srcW,$srcH);
- $ni=imagecreatetruecolor($width,$height);
- imagecopyresampled
- $res = function_exists('imagecreatetruecolor');
- var_dump($res) ;
- */
- ?>
-
复制代
|