채택완료

get_list_thumbnail 썸네일이미지를 최상단으로 지정하려고 수정중인데 잘 먹히지가 않습니다.

이미지 썸네일이 세로형으로 길어서 상단부분으로 지정하려고 $crop_mode 를 top 기입하고 필요한부분을 수정하여 관리자 썸네일파일일괄삭제도 하였으나 잘 먹히지가 않습니다.

 

본이미지가 600x1200 정도로 길긴하지만 center일때와 top일때가 변화가 없어 소스를 잘못적용시켰나해서 봐도 틀린부분이 보이지가 않습니다.

 

빠진부분이 있는건지 도움 부탁드려요 ㅠ

 

 

/list.skin.php

Copy
$thumb_width = 280;
$thumb_height = 200;

$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true,'top');

 

/lib/thumbnail.lib.php

Copy
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='top', $is_sharpen=false, $um_value='80/0.5/3')

...

function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_height, $is_create, $is_crop=true, $crop_mode='top', $is_sharpen=false, $um_value='80/0.5/3')

...

        if($is_crop) {
            switch($crop_mode)
            {
                case 'top':
                    if($size[1] / $size[0] >= $ratio) {
                        $src_h = round($src_w * $ratio);
                        $src_y = round(($size[1] - $src_h) / 2);
                    } else {
                        $src_w = round($size[1] / $ratio);
                        $src_x = round(($size[0] - $src_w) / 2);
                    }
                    break;
                default:
                    if($size[1] / $size[0] >= $ratio) {
                        $src_h = round($src_w * $ratio);
                    } else {
                        $src_w = round($size[1] / $ratio);
                    }
                    break;
            }

            $dst = imagecreatetruecolor($dst_w, $dst_h);

 

 

|

답변 1개 / 댓글 1개

채택된 답변
+20 포인트

제가 top 으로 해봤는데.. 이상없이 잘 되는데요??

이미지를 삭제하고 다시 올려보세요..^^;;

http://eyekiss.kr/bbs/board.php?bo_table=gallery

답변에 대한 댓글 1개

이상하게 안되는군요 ㅠㅠ

답변을 작성하려면 로그인이 필요합니다.