How to sharpening an uploaded image in PHP ?
Is there some PHP libraries ? What is the best ?
How to sharpening an uploaded image in PHP ?
Is there some PHP libraries ? What is the best ?
Here's an unsharp mask for PHP. (Unsharp mask is one of the most common types of sharpening used.)
Here's another option (using GD).
ImageMagick offers best quality and lot of other features. Use adaptiveSharpenImage
function:
<?php
try
{
$image = new Imagick('image.png');
$image->adaptiveSharpenImage(2,1);
}
catch(ImagickException $e)
{
echo 'Error: ' , $e->getMessage();
die();
}
header('Content-type: image/png');
echo $image;
?>
The most straightforward way is to use PHP's imageXXX()
routines, such as imagecreatefromjpeg()
etc.
For more powerful scripted image editing, consider ImageMagick, or some other scriptable image processor.
In this PHP Manual comment, someone is referring to function imageconvolution(), complete with an example.