mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Keep ImagickBackend API consistent with Image_Backend interface and fix color formatting.
This commit is contained in:
parent
a838e9bae6
commit
47cc157d97
@ -184,7 +184,7 @@ class ImagickBackend extends Imagick implements Image_Backend {
|
|||||||
* @param int $height
|
* @param int $height
|
||||||
* @return Image_Backend
|
* @return Image_Backend
|
||||||
*/
|
*/
|
||||||
public function paddedResize($width, $height, $backgroundColor = "#FFFFFF00") {
|
public function paddedResize($width, $height, $backgroundColor = "FFFFFF") {
|
||||||
if(!$this->valid()) return;
|
if(!$this->valid()) return;
|
||||||
|
|
||||||
$width = round($width);
|
$width = round($width);
|
||||||
@ -197,7 +197,7 @@ class ImagickBackend extends Imagick implements Image_Backend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$new = clone $this;
|
$new = clone $this;
|
||||||
$new->setBackgroundColor($backgroundColor);
|
$new->setBackgroundColor("#".$backgroundColor);
|
||||||
|
|
||||||
$destAR = $width / $height;
|
$destAR = $width / $height;
|
||||||
if ($geometry["width"] > 0 && $geometry["height"] > 0) {
|
if ($geometry["width"] > 0 && $geometry["height"] > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user