1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-13 17:34:04 +02:00

Merge pull request #685 from agence-webup/master

Fix rgba string with non-localized number
This commit is contained in:
Oliver Vogel
2017-02-10 16:48:08 +01:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -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));
}
/**

View File

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

View File

@@ -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)
);
}