Skip to content

Commit 3be0322

Browse files
committed
Merge pull request #709 from mangelsnc/hotfix/unexistent-color-class
Revert "Merge pull request #699 from jockri/fix-background-filter"
2 parents 73a6497 + fdcf396 commit 3be0322

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Imagine/Filter/Loader/BackgroundFilterLoader.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Liip\ImagineBundle\Imagine\Filter\Loader;
44

55
use Imagine\Image\Box;
6-
use Imagine\Image\Color;
76
use Imagine\Image\ImageInterface;
87
use Imagine\Image\ImagineInterface;
98
use Imagine\Image\Point;
@@ -25,9 +24,9 @@ public function __construct(ImagineInterface $imagine)
2524
*/
2625
public function load(ImageInterface $image, array $options = array())
2726
{
28-
$background = new Color(
27+
$background = $image->palette()->color(
2928
isset($options['color']) ? $options['color'] : '#fff',
30-
isset($options['transparency']) ? $options['transparency'] : 0
29+
isset($options['transparency']) ? $options['transparency'] : null
3130
);
3231
$topLeft = new Point(0, 0);
3332
$size = $image->getSize();

0 commit comments

Comments
 (0)