How to add unsharp mask to this code?
Posted: 2016-12-16T10:30:20-07:00
I am using a forum software called Xenforo, which resizes images using Imagick.
If the code says:
and later in the code this:
How can I add a little unsharp mask to those resize operations?
If the code says:
Code: Select all
foreach ($this->_image AS $frame)
{
$frame->resizeImage($width, $height, Imagick::FILTER_LANCZOS, 0.9, true); // keep EXIF
$frame->setImagePage($frame->getImageWidth(), $frame->getImageHeight(), 0, 0);
}
Code: Select all
if ($scaleUp)
{
$frame->resizeImage($width, $height, Imagick::FILTER_LANCZOS, 0.9, true);
}
else if ($oldImagick)
{
$frame->resizeImage($width, $height, Imagick::FILTER_LANCZOS, 0.9, true); // keep EXIF
}
else
{
$frame->resizeImage($width, $height, Imagick::FILTER_LANCZOS, 0.9, true); // higher-quality scaling + EXIF retained
}
$frame->setImagePage($width, $height, 0, 0);
}