Reputation: 6647
My client wants to apply a filter (she has described it as the rough pastel filter in photoshop, but I'm fairly sure she really wanted some sort of a pencil sketched picture) to some pictures the users upload to the server. There is one limitation here: It needs to work with fairly any smartphone and computer (so no flash here. Such a pity). The good part is that it can be entirely done on the server, without showing the resulting picture to the user (so it can be processed by external applications and it doesn't need to be "that fast").
The server is running linux and I'm sure I can install Imagemagick if it isn't already, and probably run other custom scripts (my client hasn't confirmed it yet), such as c++ applications or so. However, working with just PHP would be a plus, of course (I smell a shared server).
I won't ask anybody to code me a filter (of course, the client doesn't even know which she wants), but I'm actually asking if you think it's possible to do so, and if there is any wrapping library that does all the job or I need to do it by myself.
Upvotes: 1
Views: 1899
Reputation: 5299
Imagemagick has quite a lot of filters etc. built in. I have an example of most of them on my site here: http://www.rubblewebs.co.uk/imagemagick/operator.php
There is an API built into php called Imagick and I am working on some examples for it at the moment but it is a bit of a pain to use with minimal documentation. This is an example of using the sketch operator in Imagick:
Imagick documentation for Above effect: http://php.net/manual/en/imagick.sketchimage.php
In my Imagemagick examples I am using a grayscale version but it should be a similar result to the above image.
There are some filters using GD now but I have not tried them: http://php.net/manual/en/function.imagefilter.php
Upvotes: 5