imagine

Post on 22-Jun-2015

232 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

A brief overview of Imagine, Image manipulation library for PHP. Imagine has redefined the way we do image manipulation in PHP. This is my attempt to introduce you briefly about Imagine.

TRANSCRIPT

ImagineImage manipulation reloaded

About me

• Ujjwal Ojha• Study BSc. CSIT• Work at Hrevert Technologies• Profession: Web application developer

Table of Contents

• Available Tools• Imagine Introduction• Filters• Transformation• Imagine and Zend Framework 2• Imagine and Symfony 2

Available Tools

• Gd• Imagick• Gmagick

Problems with available tools

• Hard to test• Inconsistent• Different API• Not intuitive

Image resizing in GD

Image resizing with Imagick

Then, comes Imagine

• Same API for Gd, Imagick and Gmagick• Easily testable by mocking interfaces• Simple and intuitive API

GD Driver

Imagick driver

Gmagick driver

Image resizing with GD

Image resizing with Imagick

Image resizing with Gmagick

Operations

• Resize• Rotate• Crop• Copy• Paste• Apply mask• ………….

Filters

Filter is a collection of manipulations, calculations and other operations, that can be applied to an image.

Filter implementation

TRANSFORMATION

Transformation

Delay image processing using a filter

Transformation

Example

IMAGINE AND ZEND FRAMEWORK 2

Imagine and Zend Framework 2

HtImgModule

Benefits

• Easy configuration• Easy integration• Use in templates• Automated caching

Configure

Use in view templates

IMAGINE AND ZEND FRAMEWORK 2

Imagine and Symfony 2

LiipImagineBundle

Configure

Usage

Twig

PHP

Imagine

Image manipulation reloaded

THE END

top related