note 104006 modified in function.imageconvolution by danbrown
| From: | danbrown@php.net | Date: | Tue, 17 May 2011 14:11:45 +0000 |
| Subject: | note 104006 modified in function.imageconvolution by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179792@lists.php.net to get a copy of this message | ||
Here's a good sharpen setting for thumbnail creation:
<?php
$sharpenMatrix = array
(
array(-1.2, -1, -1.2),
array(-1, 20, -1),
array(-1.2, -1, -1.2)
);
// calculate the sharpen divisor
$divisor = array_sum(array_map('array_sum', $sharpenMatrix));
$offset = 0;
// apply the matrix
imageconvolution($img, $sharpenMatrix, $divisor, $offset);
?>
--was--
Here's a good sharpen setting for thumbnail creation:
$sharpenMatrix = array
(
array(-1.2, -1, -1.2),
array(-1, 20, -1),
array(-1.2, -1, -1.2)
);
// calculate the sharpen divisor
$divisor = array_sum(array_map('array_sum', $sharpenMatrix));
$offset = 0;
// apply the matrix
imageconvolution($img, $sharpenMatrix, $divisor, $offset);
http://php.net/manual/en/function.imageconvolution.php