썸네일질문입니다. 정보
썸네일질문입니다.본문
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=60556&sca=&sfl=wr_subject&stx=%B0%CB%BB%F6&sop=and&page=3 이 스킨을 사용하는데 썸네일크기를 110*85이렇게 수정하니 희미하게나옵니다.
<?
$comment_href = "";
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++)
{ //데이터 루프
//썸네일 코드 시작
$img = $list[$idx][$i][wr_id];
$roo = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$search_table[$idx]' and wr_id = '$img' and bf_no = '0' ");
$data_path = $g4['path'] . "/data/file/{$search_table[$idx]}";//라이브러리 파일 참조
$thumb_path = $data_path . '/thumbSearch';
$sch_w = 110; //썸네일 가로사이즈
$sch_h = 85; //썸네일 세로사이즈
$sch_q = 100; //썸네일 퀼리티
//디렉토리 생성
if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
$filename = $roo[bf_file]; //파일명
//if($filename != "")
{
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $sch_w / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $sch_h)
$dst = imagecreatetruecolor($sch_w, $height);
else
$dst = imagecreatetruecolor($sch_w, $sch_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $sch_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
chmod($thumb_path.'/'.$filename, 0707);
}
}
}
//else
{
//$thumb = "";
}
if (file_exists($thumb) && $filename != "")
$img = $thumb;
else
$img = "";
$iscmt = "";
if ($list[$idx][$i][wr_is_comment])
{
$iscmt = "<font color=999999>[코멘트]</font> ";
$comment_href = "#c_".$list[$idx][$i][wr_id];
}
?>
여기를 수정했는데도 않되네요 .그리고 썸네일을 저장한후 보면 80*63으로되있어요...아시는분 좀 도와주세요...감사합니다.
댓글 전체