Imagine - Unified PHP 5.3 API for GD2, ImageMagick, GraphicsMagick
Imagine is a nice looking image manipulation library for PHP 5.3+ that supports GD2, ImageMagick, and GraphicsMagick in a clean, chainable API from Bulat Shakirzyanov:
<?php
$imagine = new ImagineGdImagine();
// or
$imagine = new ImagineImagickImagine();
// or
$imagine = new ImagineGmagickImagine();
$size = new ImagineImageBox(40, 40);
$mode = ImagineImageImageInterface::THUMBNAIL_INSET;
// or
$mode = ImagineImageImageInterface::THUMBNAIL_OUTBOUND;
$imagine->open('/path/to/large_image.jpg')
->thumbnail($size, $mode)
->save('/path/to/thumbnail.png')
;
Check out the extremely detailed project docs and examples for advanced usage.
Discussion
Sign in or Join to comment or subscribe