Hello everyone
PNG thumbnails before encountering problems
So for everyone to share code
Hope that helps
//Original Picture $im_path = 'test.png'; $im = imagecreatefrompng($im_path); $im_info = getimagesize($im_path);//Obtain old picture information //Generate new images $new_im = imagecreatetruecolor(500,500); imagealphablending($new_im, false); imagesavealpha($new_im, true);//Transparent //old picture + new picture imagecopyresampled($new_im,$im,0,0,0,0,500,500,$im_info[0],$im_info[1]); //Output New Photos Header("Content-type: image/png"); ImagePNG($new_im);
Basically output picture is much the same way
To send emphasis header
It is best to do rewrite
To ask me if still have questions
Thanksgiving
Message Board
Feel free to leave suggestions and share! Thanksgiving!