Imagine is an object-oriented PHP library for working with images and manipulating them. The library can handle frequently-used operations like resize, crop or applying filters. A color class helps generating the RGB values of any given color and methods exist for drawing shapes like arc, ellipse, line, pieSlice and more.

Imagine is a OOP library for image manipulation built in PHP 5.3 using the latest best practices and thoughtful design that should allow for decoupled and unit-testable code.

Is possible to load any font file and insert text into images with a flexible font class. Imagine is a frequently-updated library with an exciting to-do-list like charting, reflection and rounded corner filters.

How to Use

< ?php

$imagine = new Imagine\Gd\Imagine();
$size    = new Imagine\Image\Box(40, 40);
$mode    = Imagine\Image\ImageInterface::THUMBNAIL_INSET;
// or
$mode    = Imagine\Image\ImageInterface::THUMBNAIL_OUTBOUND;

    ->thumbnail($size, $mode)


Leave a Reply

Your email address will not be published. Required fields are marked *

20 + twelve =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Also Like

Genghis – A Single File MongoDB Admin

In order to manage MongoDB databases easily, Genghis, a single-file, self-hosted and web-based solution is pretty handy. It can be installed either as a Ruby gem or as a standalone PHP script.