修改文件:inc_photograph.php
找到
if($toWH<=$srcWH){
$ftoW=$toW;
$ftoH=$ftoW*($srcH/$srcW);
}
else{
$ftoH=$toH;
$ftoW=$ftoH*($srcW/$srcH);
}
更改为
$ftoH=$toH;
$ftoW=$toW;
if ($toWH<=$srcWH) {
$src_Y = 0;
$src_X = ($srcW-$srcH*$toWH)/2;
$srcW = $srcH*$toWH;
} else {
$src_X = 0;
$src_Y = ($srcH-$srcW/$toWH)/2;
$srcH = $srcW/$toWH;
}
找到
($ni,$im,0,0,0,0,$ftoW,$ftoH,$srcW,$srcH)
更改为
($ni,$im,0,0,$src_X,$src_Y,$ftoW,$ftoH,$srcW,$srcH)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)