Commit 7786fa5d by Kevin LEVRON

For Imagine v0.5 (previous code was for 0.6 dev)

parent 0034b3c1
...@@ -14,7 +14,6 @@ use Imagine\Image\ImageInterface; ...@@ -14,7 +14,6 @@ use Imagine\Image\ImageInterface;
use Imagine\Image\ImagineInterface; use Imagine\Image\ImagineInterface;
use Imagine\Image\ManipulatorInterface; use Imagine\Image\ManipulatorInterface;
use Imagine\Image\Point; use Imagine\Image\Point;
use Imagine\Image\Palette\RGB;
use yii\base\InvalidConfigException; use yii\base\InvalidConfigException;
use yii\base\InvalidParamException; use yii\base\InvalidParamException;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
...@@ -156,8 +155,7 @@ class BaseImage ...@@ -156,8 +155,7 @@ class BaseImage
$img = $img->thumbnail($box, $mode); $img = $img->thumbnail($box, $mode);
// create empty image to preserve aspect ratio of thumbnail // create empty image to preserve aspect ratio of thumbnail
$color = (new RGB())->color('#FFF', 100); $thumb = static::getImagine()->create($box, new Color('FFF', 100));
$thumb = static::getImagine()->create($box, $color);
// calculate points // calculate points
$size = $img->getSize(); $size = $img->getSize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment