썸네일 생성시 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개

© SIRSOFT
현재 페이지 제일 처음으로