diff --git a/Imagine/Filter/Loader/BackgroundFilterLoader.php b/Imagine/Filter/Loader/BackgroundFilterLoader.php index 7f8d8a503..75a4ec8d6 100644 --- a/Imagine/Filter/Loader/BackgroundFilterLoader.php +++ b/Imagine/Filter/Loader/BackgroundFilterLoader.php @@ -62,10 +62,18 @@ public function load(ImageInterface $image, array $options = array()) $x = 0; $y = ($height - $image->getSize()->getHeight()) / 2; break; + case 'centerright': + $x = $width - $image->getSize()->getWidth(); + $y = ($height - $image->getSize()->getHeight()) / 2; + break; case 'center': $x = ($width - $image->getSize()->getWidth()) / 2; $y = ($height - $image->getSize()->getHeight()) / 2; break; + case 'centerleft': + $x = 0; + $y = ($height - $image->getSize()->getHeight()) / 2; + break; case 'right': $x = $width - $image->getSize()->getWidth(); $y = ($height - $image->getSize()->getHeight()) / 2;