搞了N久以为是我自己环境问题,还差点重装了GD库,仔细看看代码才发现是代码问题,along真是粗心了。
/includes/image.func.php 文件,代码
修改成
/includes/image.func.php 文件,代码
case 3:
if(!function_exists("imagecreatefrompng")){
exit("function [imagecreatefrompng] not exists!");
}
$src_file = imagecreatefromjpeg($srcFile);
break;
修改成
case 3:
if(!function_exists("imagecreatefrompng")){
exit("function [imagecreatefrompng] not exists!");
}
$src_file = imagecreatefrompng($srcFile);
break;
在开发过程中,面对长时间的环境调试,最终发现是代码中的小错误导致的问题。通过修改`imagecreatefrompng`函数调用为`imagecreatefrompng`,成功解决了从PNG到JPEG的图像转换问题。
527

被折叠的 条评论
为什么被折叠?



