썸네일 생성시 Sharpen 적용하기 - PHP 5.1 이상 > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

썸네일 생성시 Sharpen 적용하기 - PHP 5.1 이상 정보

PHP 썸네일 생성시 Sharpen 적용하기 - PHP 5.1 이상

본문

참고

http://kr2.php.net/manual/en/function.imageconvolution.php

http://kr2.php.net/manual/en/function.imageconvolution.php#58187

http://kr2.php.net/manual/en/function.imageconvolution.php#56145


sir에서 제공하는 갤러리 스킨의 썸네일 생성 부분중에

            if ($height < $h){
                $dst = imagecreatetruecolor($w, $height);
            }else{
                $dst = imagecreatetruecolor($w, $h);
   }
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $w, $height, $size[0], $size[1]);
   //image sharpen
   $matrix = array(   
      array( -1, -1, -1 ),
                        array( -1, 16, -1 ),
                        array( -1, -1, -1 )
     );
   $divisor = 8;
   $offset = 0;
   imageconvolution($dst, $matrix, $divisor, $offset);

굵은글씨 부분을 추가해 주세요

php 5.1 이상에서만 됩니다.

[이 게시물은 관리자님에 의해 2011-10-31 17:12:10 PHP & HTML에서 이동 됨]
추천
2

댓글 3개

전체 5,352
개발자팁 내용 검색

회원로그인

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