Skip to content

Commit

Permalink
Merge pull request #458 from lstrojny/bugfix/imagine-color-class
Browse files Browse the repository at this point in the history
Fixing issue with removed class Color
  • Loading branch information
makasim committed Jul 30, 2014
2 parents 80dd358 + 2e11afe commit a1b8047
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Imagine/Filter/Loader/BackgroundFilterLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,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 @@ -19,7 +18,10 @@ public function __construct(ImagineInterface $imagine)
*/
public function load(ImageInterface $image, array $options = array())
{
$background = new Color(isset($options['color']) ? $options['color'] : '#fff');
$background = $image->palette()->color(
isset($options['color']) ? $options['color'] : '#fff',
isset($options['transparency']) ? $options['transparency'] : null
);
$topLeft = new Point(0, 0);
$size = $image->getSize();

Expand Down
1 change: 0 additions & 1 deletion Tests/Binary/Loader/GridFSLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ public function testFindWithInValidDocument()
$this->loader->find('0123456789abcdef01234567');
}
}

0 comments on commit a1b8047

Please sign in to comment.