October 23, 2011

A PHP Library For Image Manipulation: Imagine

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)

Website: http://imagine.readthedocs.org/
Download: https://github.com/avalanche123/Imagine

PHP # ,
Share: / / /

You might also like

Leave a Reply

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

1 + 4 =

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

Stay In Touch