Difference between #11 and #13 of
How to use imagine ( crop, thumb, effects for images ) on Yii2

Changes

Title unchanged

How to use imagine ( crop, thumb, effects for images ) on Yii2

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

image, yii2, extensions, tutorial

Content changed

[...]
```php
"yiisoft/yii2-imagine": "*"
```

to the require section of your composer.json
. and run:
 
 
 
```php 
php composer.phar update
 
```
 


Examples of use
[...]
```

### Resizing and Preserving Aspect Ratio
 
 
 
 
```php 
use yii\imagine\Image;
 
use Imagine\Gd;
 
use Imagine\Image\Box;
 
use Imagine\Image\BoxInterface;
 
 
Image::getImagine()->open($fileName)->thumbnail(new Box($newWidth, $newHeight))->save($savePath , ['quality' => 90]);
 
 
 
 
```
 
 
### Effects
[More effects](https://imagine.readthedocs.org/en/latest/usage/effects.html "More effects")

#### Grayscale
[...]
5 0
14 followers
Viewed: 88 924 times
Version: 2.0
Category: Tutorials
Written by: Anas AbuDayah
Last updated by: Cozumel
Created on: Oct 15, 2014
Last updated: 5 years ago
Update Article

Revisions

View all history