razor / thumbnailer
An image thumbnailer service module for Zend Framework 2
v1.0.1
2013-12-30 01:34 UTC
Requires
- php: >=5.3.3
- ext-gd: *
- satooshi/php-coveralls: dev-master
- zendframework/zendframework: 2.*
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-12-16 15:34:02 UTC
README
- An image thumbnailer service module for Zend Framework 2.
- There is also available a form filter that internally uses the Thumbnailer service.
Install with Composer
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/kaiohken1982/Thumbnailer.git"
}
],
"require": {
......,
"razor/thumbnailer" : "dev-master"
}
}
How to use
In a controller
$thumbnailer = $this->getServiceLocator()->get('Thumbnailer');
$thumbnailer->open('\path\to\image.png');
$thumbnailer->resize(400);
$thumbnailer->save('\path\to\image_resized.png');
Run unit test
Please note you must be in the module root.
curl -s http://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit
If you have xdebug enabled and you want to see code coverage run the command below, it'll create html files in Thumbnailer\test\data\coverage
./vendor/bin/phpunit --coverage-html data/coverage