fbf / instafilter
Replicate Instragram-style filters in PHP. Translates photoshop functions to PHP.
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 103
Watchers: 19
Forks: 11
Open Issues: 0
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-11-05 03:44:35 UTC
README
Replicate Instragram-style filters in PHP. Translates photoshop functions to PHP.
Installation
The tmp directory must be writable.
Usage
Fork and pull request any useful changes you make.
\Instafilter\Image::load('kittens.png') ->resize(200, 200) ->apply_filter(new Instafilter\Filter\Earlybird()) ->save('new.jpg');
n.b. applying the filter is quite slow; You'll get a significant performance gain by resizing before applying the filter.
If you don't use an autoloader, you'll need to load in the classes:
require_once('classes/Image.php'); require_once('classes/Filter.php'); require_once('classes/Filter/Earlybird.php'); require_once('classes/Filter/Inkwell.php');
Todo
- Add more filters
- (Somehow) Improve performance
- Improve interface
- Implement more photoshop functions in imagemagick
- Implement 'curves' properly by using polynomial regression to get the coefficients needed for imagick's FX function
- Abstract and decouple from Image class
- Make composer/packagist compatible
Author
Rob McCann
http://robmccann.co.uk
Thanks
- FuelPHP for use of (parts of) their image class.
- Daniel Box for his Photoshop actions for instagram filters (http://dbox.tumblr.com/post/5426249009/instagram-filters-as-photoshop-actions)