From db42b191990e602a1a9137fc4d6678c448f7260c Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 18 Oct 2021 18:32:11 +0200 Subject: [PATCH] Set the initial imagick colorspace whenever possible --- src/Imagick/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Imagick/Image.php b/src/Imagick/Image.php index bd25e99a..be6c2028 100644 --- a/src/Imagick/Image.php +++ b/src/Imagick/Image.php @@ -71,7 +71,7 @@ public function __construct(\Imagick $imagick, PaletteInterface $palette, Metada { $this->metadata = $metadata; $this->imagick = $imagick; - if (static::getDriverInfo()->hasFeature(DriverInfo::FEATURE_COLORSPACECONVERSION)) { + if (method_exists($imagick, 'setcolorspace')) { $this->setColorspace($palette, false); } $this->palette = $palette;