|
|
|
@ -14,6 +14,7 @@ use Imagine\Image\ImageInterface;
|
|
|
|
|
use Imagine\Image\ImagineInterface; |
|
|
|
|
use Imagine\Image\ManipulatorInterface; |
|
|
|
|
use Imagine\Image\Point; |
|
|
|
|
use Imagine\Image\Palette\RGB; |
|
|
|
|
use yii\base\InvalidConfigException; |
|
|
|
|
use yii\base\InvalidParamException; |
|
|
|
|
use yii\helpers\ArrayHelper; |
|
|
|
@ -155,7 +156,8 @@ class BaseImage
|
|
|
|
|
$img = $img->thumbnail($box, $mode); |
|
|
|
|
|
|
|
|
|
// create empty image to preserve aspect ratio of thumbnail |
|
|
|
|
$thumb = static::getImagine()->create($box); |
|
|
|
|
$color = (new RGB())->color('#FFF', 100); |
|
|
|
|
$thumb = static::getImagine()->create($box, $color); |
|
|
|
|
|
|
|
|
|
// calculate points |
|
|
|
|
$size = $img->getSize(); |
|
|
|
|