不知道在哪里,但我发现了一个图像托管网站,它允许您以大格式上传图像或锐化图像。
我个人不记得或不知道 GD 库有任何锐化图像的功能,这可能只是质量提升的不同词。
如果有人知道锐化图像的功能,请告诉我,因为我个人在 Image Magic 和/或 GD 库中都不知道此类功能。
您可以使用图像卷积 https://www.php.net/manual/en/function.imageconvolution.php在 GD 中使用锐化蒙版。从http://adamhopkinson.co.uk/blog/2010/08/26/sharpen-an-image-using-php-and-gd/ https://web.archive.org/web/20191130192906/http://adamhopkinson.co.uk/blog/2010/08/26/sharpen-an-image-using-php-and-gd/:
PHP 和 GD 可以通过提供矩阵来锐化图像imageconvolution
:
// create the image resource from a file
$i = imagecreatefromjpeg('otter.jpg');
// define the sharpen matrix
$sharpen = array(
array(0.0, -1.0, 0.0),
array(-1.0, 5.0, -1.0),
array(0.0, -1.0, 0.0)
);
// calculate the sharpen divisor
$divisor = array_sum(array_map('array_sum', $sharpen));
// apply the matrix
imageconvolution($i, $sharpen, $divisor, 0);
// output the image
header('Content-Type: image/jpeg');
imagejpeg($i);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)