xj/yii2-kohanaimage yii2-kohanaimage

yii2-kohanaimage

composer.json

"require": {
    "yii2-kohanaimage": "*"
},

Example

header("Content-Type: image/jpg");
$pathToFile = 'f:/1.jpg';
$pathToFile2 = 'f:/2.jpg';
echo Image::load($pathToFile)->render('png');
echo Image::load($pathToFile)->crop(100, 100)->render();
echo Image::load($pathToFile)->resize(100, 100, Image::INVERSE)->render();
echo Image::load($pathToFile)->resize(100, null)->render();
echo Image::load($pathToFile)->resize(null, 100)->render();
echo Image::load($pathToFile)->rotate(45)->render();
echo Image::load($pathToFile)->resize(400, null)->sharpen(20)->render();
echo Image::load($pathToFile)->rotate(45)->watermark(Image::load($pathToFile2))->render();

Properties

Image::load($pathToFile)->width;
Image::load($pathToFile)->height;
Image::load($pathToFile)->type;
Image::load($pathToFile)->mime;

Methods

background()
crop()
factory()
flip()
reflection()
render()
resize()
rotate()
save()
sharpen()
watermark()

Ref

http://kohanaframework.org/3.2/guide/api/Image

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



4.0.3 is the latest of 4 releases



BSD-3-Clause license
Stats
0 github stars & 2 github forks
0 downloads in the last day
0 downloads in the last 30 days
58 total downloads