Reputation: 26567
How to sharpening an uploaded image in PHP ?
Is there some PHP libraries ? What is the best ?
Upvotes: 1
Views: 2980
Reputation: 66415
In this PHP Manual comment, someone is referring to function imageconvolution(), complete with an example.
Upvotes: 0
Reputation: 20721
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.
Upvotes: -2
Reputation: 46692
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;
?>
Upvotes: 3
Reputation: 70849
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).
Upvotes: 0