썸네일 안나오는것 추가 질문

· 15년 전 · 1717 · 5
추가질문..ㅜㅜ

첨부파일

list.skin.php (60.8 KB) 8회 2010-05-16 13:40
view.skin.php (46.6 KB) 0회 2010-05-16 13:40
|

댓글 5개

$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);
}
}

요 부분인데 정신이 하나도 없네요.

간단 게시판에 간단 최근게시물 출력하면 잘 될텐데... 소스가 너무 복잠하여 머리가 아픕니다.

다음분께 패스 ...
제가 만든게 아니라서.ㅠ
프리즈 도와주세요..ㅜㅜ
GD 버젼에 따라서 최고 퀄리티가 100 또는 10 일 경우가 있다 하네요.

imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 100);

imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 9); 로 바꾸어 보세요
감사합니다.ㅜㅜ 이렇게 하니 썸네일 적용되네요..
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
15년 전 조회 2,309
15년 전 조회 1,525
15년 전 조회 1,585
15년 전 조회 2,006
15년 전 조회 1,522
15년 전 조회 1,515
15년 전 조회 1,742
15년 전 조회 1,491
15년 전 조회 1,622
15년 전 조회 1,718
15년 전 조회 1,545
15년 전 조회 1,947
15년 전 조회 1,517
15년 전 조회 1,442
15년 전 조회 1,619
15년 전 조회 1,704
15년 전 조회 1,645
15년 전 조회 2,293
15년 전 조회 1,624
15년 전 조회 1,518
🐛 버그신고