有没有办法使用imagecreatefromstring()
并以某种方式得到图像类型是什么?
当您使用 imagecreatefrom... 方法时,图像将作为未压缩的位图加载到内存中。此时还没有真正的图像类型。您可以使用 image... 功能将其保存为您想要的任何类型。
$img = imagecreatefromstring($data);
imagepng($img, "file path and name");
imagedestroy($img);
https://www.php.net/manual/en/function.imagecreatefromstring.php https://www.php.net/manual/en/function.imagecreatefromstring.php
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)