[PHP] PHP改变图片的尺寸 →→→→→进入此内容的聊天室

来自 , 2020-11-30, 写在 PHP, 查看 169 次.
URL http://www.code666.cn/view/d3157f2f
  1. <?PHP
  2. $src = ImageCreateFromJPEG('php.jpg');
  3. $width = ImageSx($src);
  4. $height = ImageSy($src);
  5. $x = $widht/2;
  6. $y = $height/2;
  7. $dst = ImageCreateTrueColor($x,$y);
  8. ImageCopyResampled($dst,$src,0,0,0,0,$x,$y,$widht,$height);
  9. header('Content-Type : image/png');
  10. ImagePNG($det);
  11. ?>
  12.  

回复 "PHP改变图片的尺寸"

这儿你可以回复上面这条便签

captcha