diff --git a/src/Intervention/Image/Gd/Color.php b/src/Intervention/Image/Gd/Color.php index 51ba1606..5238831f 100644 --- a/src/Intervention/Image/Gd/Color.php +++ b/src/Intervention/Image/Gd/Color.php @@ -177,7 +177,7 @@ class Color extends AbstractColor */ public function getRgba() { - return sprintf('rgba(%d, %d, %d, %.2f)', $this->r, $this->g, $this->b, round(1 - $this->a / 127, 2)); + return sprintf('rgba(%d, %d, %d, %.2F)', $this->r, $this->g, $this->b, round(1 - $this->a / 127, 2)); } /** diff --git a/src/Intervention/Image/Gd/Commands/OpacityCommand.php b/src/Intervention/Image/Gd/Commands/OpacityCommand.php index 201fcabc..081e68a4 100644 --- a/src/Intervention/Image/Gd/Commands/OpacityCommand.php +++ b/src/Intervention/Image/Gd/Commands/OpacityCommand.php @@ -18,7 +18,7 @@ class OpacityCommand extends \Intervention\Image\Commands\AbstractCommand $size = $image->getSize(); // build temp alpha mask - $mask_color = sprintf('rgba(0, 0, 0, %.1f)', $transparency / 100); + $mask_color = sprintf('rgba(0, 0, 0, %.1F)', $transparency / 100); $mask = $image->getDriver()->newImage($size->width, $size->height, $mask_color); // mask image diff --git a/src/Intervention/Image/Imagick/Color.php b/src/Intervention/Image/Imagick/Color.php index a914feea..3940993e 100644 --- a/src/Intervention/Image/Imagick/Color.php +++ b/src/Intervention/Image/Imagick/Color.php @@ -163,7 +163,7 @@ class Color extends \Intervention\Image\AbstractColor */ public function getRgba() { - return sprintf('rgba(%d, %d, %d, %.2f)', + return sprintf('rgba(%d, %d, %d, %.2F)', $this->getRedValue(), $this->getGreenValue(), $this->getBlueValue(), @@ -248,7 +248,7 @@ class Color extends \Intervention\Image\AbstractColor $a = is_null($a) ? 1 : $a; return $this->pixel = new \ImagickPixel( - sprintf('rgba(%d, %d, %d, %.2f)', $r, $g, $b, $a) + sprintf('rgba(%d, %d, %d, %.2F)', $r, $g, $b, $a) ); }