The preferred way to install this extension is through composer.
Either run
php composer.phar require --dev --prefer-dist yii2-extensions/imagine
or add
"yii2-extensions/imagine": "dev-main"
to the require-dev section of your composer.json
file.
This extension is a wrapper to the Imagine and also adds the most commonly used image manipulation methods.
The following example shows how to use this extension:
use yii\imagine\Image;
// frame, rotate and save an image
Image::frame('path/to/image.jpg', 5, '666', 0)
->rotate(-8)
->save('path/to/destination/image.jpg', ['jpeg_quality' => 50]);
Check the documentation testing to learn about testing.
The MIT License. Please see License File for more information.