Gregwar/Image — pull request #63 by Hirbod (2014-10-10 01:54:43+00:00)
Title: added powerful sharpen() filter

Hi,

this is really one of the best image classes I've found. Really clean and nice work!
There was just one thing I didn't like: sharp()

It just runs the MEAN_REMOVAL and causes ugly images. I've implemented some more powerful method which also can receive parameters.

```php
public function sharpen($amount = 80, $radius = 0.5, $threshold = 3);
```

The default settings are similar to photshop and the maximum values are also like photoshop. In most cases it should be good to just call ->sharpen() in your chain. If you want to be more or less aggressive, you can change the params.

I hope you merge this PR and this fits to your coding standards.

**Important**
If you try to sharpen a GIF this will cause a black output. Sharping indexed colors is not possible. I you want to sharpen you need to convert first to JPEG and convert back to GIF. To prevent ugly or slow rendering problems, always use this filter at the end. Really, just do it. ->resize()->crop().....->sharpen()

This filter has works also on PHP < 5, I guess we could/should remove this parts (I used this filter long time ago also with PHP4, but it's even fine with PHP 5.5+). It's up to you, as this Image-Class don't work with < 5.3

Maybe we should add also something like this: (pseudocode)

```php
if imagetype == gif
return $this
```