썸네일 center_mode 시 썸네일 height가 원본이미지가 작을때도 동작되게 수정
This commit is contained in:
@ -306,8 +306,11 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
|||||||
if(!$thumb_height) {
|
if(!$thumb_height) {
|
||||||
$thumb_height = round(($thumb_width * $size[1]) / $size[0]);
|
$thumb_height = round(($thumb_width * $size[1]) / $size[0]);
|
||||||
} else {
|
} else {
|
||||||
if($size[0] < $thumb_width || $size[1] < $thumb_height)
|
if($crop_mode === 'center' && ($size[0] > $thumb_width || $size[1] > $thumb_height)){
|
||||||
|
$is_large = true;
|
||||||
|
} else if($size[0] < $thumb_width || $size[1] < $thumb_height) {
|
||||||
$is_large = false;
|
$is_large = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if($thumb_height) {
|
if($thumb_height) {
|
||||||
|
|||||||
Reference in New Issue
Block a user