썸네일 이미지 품질 config.php 에서 설정할 수 있도록 수정

This commit is contained in:
chicpro
2014-01-13 10:31:48 +09:00
parent 4261c92f61
commit 0cdaa1fd2d
2 changed files with 9 additions and 1 deletions

View File

@ -156,4 +156,7 @@ define('G5_SMTP', '127.0.0.1');
// 게시판에서 링크의 기본개수를 말합니다.
// 필드를 추가하면 이 숫자를 필드수에 맞게 늘려주십시오.
define('G5_LINK_COUNT', 2);
// 썸네일 jpg Quality 설정
define('G5_THUMB_JPG_QUALITY', 90);
?>

View File

@ -356,7 +356,12 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
UnsharpMask($dst, $val[0], $val[1], $val[2]);
}
imagejpeg($dst, $thumb_file, 90);
if(!defined('G5_THUMB_JPG_QUALITY'))
$jpg_quality = 90;
else
$jpg_quality = G5_THUMB_JPG_QUALITY;
imagejpeg($dst, $thumb_file, $jpg_quality);
chmod($thumb_file, G5_FILE_PERMISSION); // 추후 삭제를 위하여 파일모드 변경
imagedestroy($src);