mirror of
https://github.com/Intervention/image.git
synced 2025-08-23 22:12:51 +02:00
Fix bug in DrawPolygonModifier of imagick driver
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Intervention\Image\Drivers\Imagick\Modifiers;
|
||||
|
||||
use ImagickDraw;
|
||||
use ImagickPixel;
|
||||
use RuntimeException;
|
||||
use Intervention\Image\Interfaces\ImageInterface;
|
||||
use Intervention\Image\Interfaces\SpecializedInterface;
|
||||
@@ -18,6 +19,7 @@ class DrawPolygonModifier extends GenericDrawPolygonModifier implements Speciali
|
||||
public function apply(ImageInterface $image): ImageInterface
|
||||
{
|
||||
$drawing = new ImagickDraw();
|
||||
$drawing->setFillColor(new ImagickPixel('transparent')); // defaults to no backgroundColor
|
||||
|
||||
if ($this->drawable->hasBackgroundColor()) {
|
||||
$background_color = $this->driver()->colorProcessor($image->colorspace())->colorToNative(
|
||||
|
Reference in New Issue
Block a user