썸네일 안나오는것 추가 질문 정보
썸네일 안나오는것 추가 질문
첨부파일
본문
추가질문..ㅜㅜ
댓글 전체

$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
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 = $board[bo_skin_3] / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $board[bo_skin_4])
$dst = imagecreatetruecolor($board[bo_skin_3], $board[bo_skin_4]);
else
$dst = imagecreatetruecolor($board[bo_skin_3], $board[bo_skin_4]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_skin_3], $board[bo_skin_4], $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 100);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
요 부분인데 정신이 하나도 없네요.
간단 게시판에 간단 최근게시물 출력하면 잘 될텐데... 소스가 너무 복잠하여 머리가 아픕니다.
다음분께 패스 ...
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
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 = $board[bo_skin_3] / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $board[bo_skin_4])
$dst = imagecreatetruecolor($board[bo_skin_3], $board[bo_skin_4]);
else
$dst = imagecreatetruecolor($board[bo_skin_3], $board[bo_skin_4]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_skin_3], $board[bo_skin_4], $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 100);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
요 부분인데 정신이 하나도 없네요.
간단 게시판에 간단 최근게시물 출력하면 잘 될텐데... 소스가 너무 복잠하여 머리가 아픕니다.
다음분께 패스 ...

제가 만든게 아니라서.ㅠ
프리즈 도와주세요..ㅜㅜ
프리즈 도와주세요..ㅜㅜ

GD 버젼에 따라서 최고 퀄리티가 100 또는 10 일 경우가 있다 하네요.
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 100);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 9); 로 바꾸어 보세요
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 100);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 9); 로 바꾸어 보세요

감사합니다.ㅜㅜ 이렇게 하니 썸네일 적용되네요..
감사