Skip to content

Commit

Permalink
fix missing method "setImageOpacity"
Browse files Browse the repository at this point in the history
due to imagemagick bump
  • Loading branch information
jygaulier authored Dec 1, 2022
1 parent 6605d13 commit 94dc35d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Imagine/Imagick/Imagine.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function create(BoxInterface $size, ColorInterface $color = null)
$imagick->setImageMatte(true);
$imagick->setImageBackgroundColor($pixel);

if (version_compare('6.3.1', $this->getVersion($imagick)) < 0) {
if (method_exists($imagick, 'setImageOpacity') && version_compare('6.3.1', $this->getVersion($imagick)) < 0) {
$imagick->setImageOpacity($pixel->getColorValue(\Imagick::COLOR_ALPHA));
}

Expand Down

0 comments on commit 94dc35d

Please sign in to comment.