Skip to content

Commit

Permalink
Merge pull request #709 from mangelsnc/hotfix/unexistent-color-class
Browse files Browse the repository at this point in the history
Revert "Merge pull request #699 from jockri/fix-background-filter"
  • Loading branch information
makasim committed Feb 16, 2016
2 parents 73a6497 + fdcf396 commit 3be0322
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Imagine/Filter/Loader/BackgroundFilterLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down

0 comments on commit 3be0322

Please sign in to comment.