PHP168的N多功能真是让人目瞪口呆。。。截取缩略图竟然从左上角截取一定大小,变量命名还有很多拼音缩写命名……哎,他们的程序让人很崩溃。
打开 inc/function.inc.php 找到
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
function gdpic($srcFile,$dstFile,$width,$height,$type=''){ require_once(PHP168_PATH."inc/waterimage.php"); if(is_array($type)){ //截取一部分,以满足匹配尺寸 cutimg($srcFile,$dstFile,$x=$type[x]?$type[x]:0,$y=$type[y]?$type[y]:0,$width,$height,$x2=$type[x2]?$type[x2]:0,$y2=$type[y2]?$type[y2]:0,$scale=$type[s]?$type[s]:100,$fix=$type[fix]?$type[fix]:''); }elseif($type==1){ //成比例的缩放 ResizeImage($srcFile,$dstFile,$width,$height); }else{ //与尺寸不匹配时.用色彩填充 gdfillcolor($srcFile,$dstFile,$width,$height); } } |