© 2013 All rights reserved.

PHP Photo Instagram filters

Simple class to create a filters similar like Instagram filters

This is sample output:


In one project I needed to create simple filters in images and because I love instagram, I inspired here.

Finally, I wrote a simple class in PHP that adjusts the picture and creates a filter

How to use?

Usage is very simple:
create source data from image
– select the filter and apply it on the picture
– send image to output



Similarly, we proceed if we need to save the image:



Class with examples of use can be found on GitHub https://github…PHP-Instagram-effects.

Comments are closed for this page


Thank you!
I do not know why but I’m getting this error:
Fatal error: __clone method called on non-object in /…/public_html/filters/boost.php on line 10

This code:
//load class
include 'filters/effects.php';
//create image from jpeg
$image = imagecreatefromjpeg("space.jpg");

//create new image with filter
$out_image = clone $image;
new Effects($out_image, Effects::GRAY);

imagejpeg($out_image, '../uptest/newimagename.jpg');


You can’t clone GD resource


What can i do with it?


you can only copy this variable:

$image = imagecreatefromjpeg(“space.jpg”);

$out_image = $image;

or maybe:


OK Thank you!

Puspa joshi

Great Class, I need one feature Valencia, could you please help on this.

Hi, i am programmer from the Czech Republic. I love web development (Ruby, Ruby on Rails, PHP, Nette) and iOS development (Objective-C, Cocoa).
To cooperate, here is my phone:
+420 608 836