테스트 사이트 - 개발 중인 베타 버전입니다

썸네일 문의 드립니다. 채택완료

난달처럼 3년 전 조회 2,344

올린 이미지가 설정한 썸네일 사이즈 보다 작으면 흰여백이 나와요. 아래 그림처럼요

thumbnail.lib.php 파일에 

$is_crop=true, 이걸 한들 false 이걸 한들 변동 사항은 없고...

 

작은 이미지라도 꽉 차고 맞게 나오도록 하려면 어떻게 해야 할까요?

 

 

 

 

</p>

<p><?php

if ( !defined( '_GNUBOARD_' ) )exit; //개별 페이지 접근 불가</p>

<p>

$img_w = $wset['thumb_w'] = ( isset( $wset[ 'thumb_w' ] ) && $wset[ 'thumb_w' ] > 0 ) ? $wset[ 'thumb_w' ] : 803;

$img_h = $wset['thumb_h'] = ( isset( $wset[ 'thumb_h' ] ) && $wset[ 'thumb_h' ] > 0 ) ? $wset[ 'thumb_h' ] : 380;</p>

<p>

$imgs_w = $wset[ 'thumb_w' ] = ( isset( $wset[ 'thumb_w' ] ) && $wset[ 'thumb_w' ] > 0 ) ? $wset[ 'thumb_w' ] : 246;

$imgs_h = $wset[ 'thumb_h' ] = ( isset( $wset[ 'thumb_h' ] ) && $wset[ 'thumb_h' ] > 0 ) ? $wset[ 'thumb_h' ] : 120;</p>

<p>}</p>

<p>?></p>

<p>

<div class="m">

  <ul class="pgwSlider">

        

    <?php

    for ( $i = 0; $i < $list_cnt; $i++ ) {

      //print_r2($list[$i]);

      $thumbs = get_list_thumbnail( $list[ $i ][ 'bo_table' ], $list[ $i ][ 'wr_id' ], $img_w, $img_h, false, true );

      $thumbs2 = get_list_thumbnail( $list[ $i ][ 'bo_table' ], $list[ $i ][ 'wr_id' ], $imgs_w, $imgs_h, false, true );

      if ( $thumbs[ 'src' ] ) {

        $img = $thumbs[ 'src' ];

        $imgs = $thumbs2[ 'ori' ];

      }

      ?>      

    

      

      

    <li><a href="<?php echo $list[$i]['href'];?>"<?php echo $is_modal_js;?><?php echo $target;?>>

        <img src="<?php echo $imgs; ?>" alt="<?php echo $list[$i]['subject']; ?>" data-large-src="<?php echo $img;?>" data-description="<?php echo mb_strimwidth(strip_tags ($list[$i]['wr_content']), '0', '130', '', 'utf-8');?>" />    

        </a>

      </li>

    <?php

    }

    ?>

  </ul>

</div>

<?php if(!$list_cnt) { ?>

<div class="post-none">글이 없습니다.</div>

<?php } ?>

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

답변 1개

채택된 답변
+20 포인트
F
3년 전

/lib/thumbnail.lib.php 파일

 

344번째 줄에 보면 

} else if($size[0] < $thumb_width || $size[1] < $thumb_height) {
    $is_large = false;
}

 

이렇게 돼 있는데 

// $is_large = false;

이부분을 위와 같이 주석처리해 주시면 됩니다. 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

난달처럼
3년 전
썽피리님 감사합니다. 어제부터 고생하던게 한번에 해결됐습니다. 고맙습니다.

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

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

로그인