2017 © Pedro Peláez
 

library image

Small module for image scaling and management

image

grishazmeypro/image

Small module for image scaling and management

  • Sunday, May 25, 2014
  • by grishazmeypro
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Image module for Anax

Build Status Scrutinizer Code Quality Code Coverage, (*1)

Getting started

In order to use this module you have to copy Image folder into your "src" directory. Then you should create "img" and "cache" folders in your webroot directory, also don't forget to set permission for cache folder to 777. Default directory for images is webroot/img and I would not recomend to change it since there is two links that has to point in the same folder, one for Image class and one for HTML output., (*2)

Usage

Here is the small example of ImageController usage, you have to define width and height and a image name that you want to scale. $di->set('ImageController', function() use ($di) { $controller = new \Anax\Image\ImageController(); $controller->setDI($di); return $controller; });, (*3)

$link = "test.jpg";
$width = 240;
$height = 300;

$image = $app->dispatcher->forward([
    'controller' => 'image',
    'action'     => 'show',
    'params'     => [$link,$width,$height],
]);

$app->views->addString($image);

code/, (*4)

The Versions

25/05 2014

dev-master

9999999-dev https://github.com/grishazmeypro/Anax-Image

Small module for image scaling and management

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Grigoriy Ustinov

mvc image anax phpgd