Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
PHP library for working with ImageMagick
PHP
branch: master
Failed to load latest commit information.
classes Added ability to change configuration options via a call to \Instafil…
tmp Added Earlybird
README.md
composer.json Added composer.json file to allow for Composer support

README.md

Instafilter

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

Something went wrong with that request. Please try again.