썸네일 생성시 Sharpen 적용하기 - PHP 5.1 이상 정보
PHP 썸네일 생성시 Sharpen 적용하기 - PHP 5.1 이상- skinartisanCOM 홈페이지 자기소개 아이디로 검색 회원게시물
- 3,285

본문
참고
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에서 제공하는 갤러리 스킨의 썸네일 생성 부분중에
굵은글씨 부분을 추가해 주세요
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);
$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
2
댓글 3개

저거 aptana 아이콘이넼ㅋㅋ

관련 댓글점 ㅋ
드림위버 버리고 APTANA 쓴지 몇달 됐네요 ㅎ
드림위버 버리고 APTANA 쓴지 몇달 됐네요 ㅎ

오~~ PHP에서도 이미지 컨벌루션을 지원하는군요..
첨 알았네요..
matrix만 잘짜면 다양하 표현도 가능하죠 ㅋㅋ
첨 알았네요..
matrix만 잘짜면 다양하 표현도 가능하죠 ㅋㅋ