dev-master
9999999-dev https://github.com/grishazmeypro/Anax-ImageSmall module for image scaling and management
MIT
The Requires
- php >=5.4
by Grigoriy Ustinov
mvc image anax phpgd
Small module for image scaling and management
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)
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)
Small module for image scaling and management
MIT
mvc image anax phpgd