From fdcf3964ab708499286c9f8fe852fa0661a8c0d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20S=C3=A1nchez=20Chordi?= Date: Tue, 16 Feb 2016 19:49:39 +0100 Subject: [PATCH] Revert "Merge pull request #699 from jockri/fix-background-filter" This reverts commit 417a2d594ea05f0cf963dfee94331a49a2c4e14e, reversing changes made to 40e98ef72acfd36e00a5843c1e58c73a460dc4c6. --- Imagine/Filter/Loader/BackgroundFilterLoader.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Imagine/Filter/Loader/BackgroundFilterLoader.php b/Imagine/Filter/Loader/BackgroundFilterLoader.php index 0febadd33..0e1df3a73 100644 --- a/Imagine/Filter/Loader/BackgroundFilterLoader.php +++ b/Imagine/Filter/Loader/BackgroundFilterLoader.php @@ -3,7 +3,6 @@ namespace Liip\ImagineBundle\Imagine\Filter\Loader; use Imagine\Image\Box; -use Imagine\Image\Color; use Imagine\Image\ImageInterface; use Imagine\Image\ImagineInterface; use Imagine\Image\Point; @@ -25,9 +24,9 @@ public function __construct(ImagineInterface $imagine) */ public function load(ImageInterface $image, array $options = array()) { - $background = new Color( + $background = $image->palette()->color( isset($options['color']) ? $options['color'] : '#fff', - isset($options['transparency']) ? $options['transparency'] : 0 + isset($options['transparency']) ? $options['transparency'] : null ); $topLeft = new Point(0, 0); $size = $image->getSize();