xRobot
xRobot

Reputation: 26567

How to sharpening an uploaded image in PHP?

How to sharpening an uploaded image in PHP ?

Is there some PHP libraries ? What is the best ?

Upvotes: 1

Views: 2980

Answers (5)

renick
renick

Reputation: 3881

You can use ImageMagick. This call is one good solution

Upvotes: 1

Lekensteyn
Lekensteyn

Reputation: 66415

In this PHP Manual comment, someone is referring to function imageconvolution(), complete with an example.

Upvotes: 0

tdammers
tdammers

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

shamittomar
shamittomar

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

Skilldrick
Skilldrick

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

Related Questions