mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 05:09:06 +02:00
FIX: Image_Backend -> croppedResize function doesn't include a backgroundColor, therefore this shouldn't be assumed in ImageMagick->croppedResize
This commit is contained in:
parent
a838e9bae6
commit
bf3ad56674
@ -247,12 +247,8 @@ class ImagickBackend extends Imagick implements Image_Backend {
|
||||
return $this;
|
||||
}
|
||||
|
||||
if(!$backgroundColor){
|
||||
$backgroundColor = new ImagickPixel('transparent');
|
||||
}
|
||||
|
||||
$new = clone $this;
|
||||
$new->setBackgroundColor($backgroundColor);
|
||||
$new->setBackgroundColor(new ImagickPixel('transparent'));
|
||||
|
||||
if(($geo['width']/$width) < ($geo['height']/$height)){
|
||||
$new->cropImage($geo['width'], floor($height*$geo['width']/$width),
|
||||
|
Loading…
Reference in New Issue
Block a user