比對過 1.0.6 和 1.1 ...
如果有跟我相同困擾的人可以以照下面修改
class/gallery/resizers/gallerygdresizer.class.php
只註解掉某段
function ImageResize($dst_img, &$src_img, $dst_x, $dst_y, $src_x,
$src_y, $dst_w, $dst_h, $src_w, $src_h,
$resample = GD_RESIZER_NO_SMOOTHING_MODE ) {
$pxls = intval($src_w / $dst_w)-1;
/*
if( $dst_w == $dst_h ) {
$length = min($src_w, $src_h);
$src_x = intval( $src_w / 2 ) - intval( $length / 2 );
$src_y = intval( $src_h / 2 ) - intval( $length / 2 );
$src_w = $length;
$src_h = $length;
}*/
加上 1.0.6的寫法, 註解掉 1.1的
function calcThumbFormat($width, $height){
$ratioimg = (float) $this->img["lebar"] / (float) $this->img["tinggi"];
$ratiothumb=(float) $width / (float) $height;
//hsuzy. 1.0.6版
if ($ratioimg == $ratiothumb){
$this->img["lebar_thumb"]=$width;
$this->img["tinggi_thumb"]=$height;
} elseif ($ratioimg > $ratiothumb){
$this->img["lebar_thumb"]=$width;
$this->img["tinggi_thumb"]=$width*((float)1/$ratioimg);
} elseif ($ratioimg < $ratiothumb){
$this->img["tinggi_thumb"]=$height;
$this->img["lebar_thumb"]=$height*$ratioimg;
}
/*
if ($ratioimg == $ratiothumb || $ratiothumb == (float) 1){
$this->img["lebar_thumb"]=$width;
$this->img["tinggi_thumb"]=$height;
} elseif ($ratioimg > $ratiothumb){
$length = max($width, $height);
$this->img["lebar_thumb"]=$length;
$this->img["tinggi_thumb"]=$length*((float)1/$ratioimg);
} elseif ($ratioimg < $ratiothumb){
$length = max($width, $height);
$this->img["tinggi_thumb"]=$length;
$this->img["lebar_thumb"]=$length*$ratioimg;
}
*/
}