The SimpleImage library for PHP

A drawing of a cartoon man pointing upwards

Heads up! This post was written in 2011, so it may contain information that is no longer accurate. I keep posts like this around for historical purposes and to prevent link rot, so please keep this in mind as you're reading.

— Cory

If you love working with PHP but hate the GD library, you'll love the Simple Image PHP class I'm releasing today. This class takes the headache out of dealing with images and features over 25 useful methods.

The class is incredibly simple to use.  The following two lines will load image.jpg, flip it horizontally, rotate it 90 degrees, shrink it to fit within a 320x200 box, apply a sepia effect, convert it to a GIF, and save it to result.gif:

$img = new SimpleImage('image.jpg');
$img->flip('x')->rotate(90)->best_fit(320, 200)->sepia()->save('result.gif');

Here's a list of the supported methods:

Download #

This project is actively maintained on GitHub. Please submit all issues and contributions to the project page. Licensed under the MIT license.

Download the latest version from GitHub

January 10, 2017: SimpleImage 3.0 has been released. Please refer to the repo for API changes and the latest features.