2017 © Pedro Peláez
 

library cropper

An image cropper service module for Zend Framework 2

image

razor/cropper

An image cropper service module for Zend Framework 2

  • Saturday, February 8, 2014
  • by Razorblade
  • Repository
  • 1 Watchers
  • 0 Stars
  • 26 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Image Cropper Module

Build Status Coverage Status Dependency Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

An image cropper service module for Zend Framework 2., (*2)

Install with Composer

{ "repositories": [ { "type": "vcs", "url": "https://github.com/kaiohken1982/Cropper.git" } ], "require": { ......, "razor/cropper" : "dev-master" } }, (*3)

How to use

In a controller, (*4)

``` $cropper = $this->getServiceLocator()->get('Cropper'); $cropper->open('/path/to/image.jpg');, (*5)

    // Type of the cut, on top image (2) or centered (1), default 1
    // $cropper->setType(1);

    // this will cut a 200x200 square
    $cropper->setSize(200, 200);

    // this will cut a square in the source image, where side equal source image width
    //$cropper->setSquareMode(true); 

    $cropper->save('/path/to/image_cropped.jpg');

```, (*6)

Run unit test

Please note you must be in the module root., (*7)

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 Watermarker\test\data\coverage, (*8)

./vendor/bin/phpunit --coverage-html data/coverage

The Versions

08/02 2014

dev-master

9999999-dev https://github.com/kaiohken1982/Cropper

An image cropper service module for Zend Framework 2

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 image crop thumbnail watermark