Skip to content

Commit

Permalink
fix Undefined constant Imagick::INTERPOLATE_BICUBIC
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzotikov committed Jan 14, 2025
1 parent c5b4cd5 commit 973fde5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/SocialMediaImageGenerator/Types/BackgroundImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ public function getImage(): \Imagick

$layer->readImage($this->getPath());

$layer->setImageInterpolateMethod(\Imagick::INTERPOLATE_BICUBIC);
if (defined('Imagick::INTERPOLATE_BICUBIC')) {
$layer->setImageInterpolateMethod(\Imagick::INTERPOLATE_BICUBIC);
} else {
$layer->setImageInterpolateMethod(\Imagick::INTERPOLATE_BILINEAR);
}

$height = $this->getHeight();
$width = $this->getWidth();
Expand Down

0 comments on commit 973fde5

Please sign in to comment.