FIX: Keep ImagickBackend API consistent with Image_Backend interface and fix color formatting.

This commit is contained in:
Jeremy Shipman 2014-07-28 11:57:32 +12:00
parent a838e9bae6
commit 47cc157d97

View File

@ -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) {