PHP scales images. When the image size is small (for example, the width is less than 100 pixels), garbled characters will be output.
好名字
好名字 2018-08-20 18:45:23
0
0
1031

$src_img=imagecreatefrompng('example.png');//Source image
$goal_img= imagecreatetruecolor($goal_width, $goal_height);//Target image
imagecopyresampled($goal_img, $src_img, 0 , 0, 0, 0, $goal_width, $goal_height, $img_width, $img_height);//Zoom
//Output
header('content-type:image/png');
imagepng( $goal_img);
imagedestroy($src_img);
imagedestroy($goal_img);

好名字
好名字

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!