썸네일 문의 드립니다.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
썸네일 문의 드립니다.

QA

썸네일 문의 드립니다.

본문

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

833467589_1661930469.7557.jpg

thumbnail.lib.php 파일에 

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

 

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

 

 

 

 


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

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

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

<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

/lib/thumbnail.lib.php 파일

 

344번째 줄에 보면 

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

 

이렇게 돼 있는데 

// $is_large = false;

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

답변을 작성하시기 전에 로그인 해주세요.
전체 60,076
QA 내용 검색

회원로그인

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