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

//Output New Photos
Header("Content-type: image/png");

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