썸네일질문입니다. > 그누4 질문답변

그누4 질문답변

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

썸네일질문입니다. 정보

썸네일질문입니다.

본문

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으로되있어요...아시는분 좀 도와주세요...감사합니다.

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT