imagine

29
Imagine Image manipulation reloaded

Upload: ujjwal-ojha

Post on 22-Jun-2015

232 views

Category:

Software


0 download

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

Page 1: Imagine

ImagineImage manipulation reloaded

Page 2: Imagine

About me

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

Page 3: Imagine

Table of Contents

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

Page 4: Imagine

Available Tools

• Gd• Imagick• Gmagick

Page 5: Imagine

Problems with available tools

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

Page 6: Imagine

Image resizing in GD

Page 7: Imagine

Image resizing with Imagick

Page 8: Imagine

Then, comes Imagine

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

Page 9: Imagine

GD Driver

Page 10: Imagine

Imagick driver

Page 11: Imagine

Gmagick driver

Page 12: Imagine

Image resizing with GD

Page 13: Imagine

Image resizing with Imagick

Page 14: Imagine

Image resizing with Gmagick

Page 15: Imagine

Operations

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

Page 16: Imagine

Filters

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

Page 17: Imagine

Filter implementation

Page 18: Imagine

TRANSFORMATION

Transformation

Delay image processing using a filter

Page 19: Imagine

Transformation

Page 20: Imagine

Example

Page 21: Imagine

IMAGINE AND ZEND FRAMEWORK 2

Imagine and Zend Framework 2

HtImgModule

Page 22: Imagine

Benefits

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

Page 23: Imagine

Configure

Page 24: Imagine

Use in view templates

Page 25: Imagine

IMAGINE AND ZEND FRAMEWORK 2

Imagine and Symfony 2

LiipImagineBundle

Page 26: Imagine

Configure

Page 27: Imagine

Usage

Twig

PHP

Page 28: Imagine

Imagine

Image manipulation reloaded

Page 29: Imagine

THE END