이미지 썸네일 생성시 코드 오류 수정 (같은 크기로 리사이즈시 오류 발생)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2313 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-11 10:28:22 +00:00
parent 23c82ef85d
commit d428eb6f92
2 changed files with 3 additions and 3 deletions

View file

@ -208,8 +208,8 @@
@imagefilledrectangle($thumb,0,0,$resize_width-1,$resize_height-1,$white);
// 이미지 정보가 정해진 크기보다 크면 크기를 바꿈 (%를 구해서 처리)
if($resize_width>0 && $width > $resize_width) $width_per = $resize_width / $width;
if($resize_height>0 && $height > $resize_height) $height_per = $resize_height / $height;
if($resize_width>0 && $width >= $resize_width) $width_per = $resize_width / $width;
if($resize_height>0 && $height >= $resize_height) $height_per = $resize_height / $height;
if($width_per < $height_per) $per = $height_per;
else $per = $width_per;

View file

@ -738,7 +738,7 @@
$target_filename = sprintf('%s%d.gif', $target_path, $member_srl);
// 파일 정보 구함
list($width, $height, $type, $attrs) = @getimagesize($source_file);
list($width, $height, $type, $attrs) = @getimagesize($target_file);
// 지정된 사이즈보다 크거나 gif가 아니면 변환
if($width > $max_width || $height > $max_height || $type!=1) FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif');