diff --git a/src/Intervention/Image/Imagick/Commands/MaskCommand.php b/src/Intervention/Image/Imagick/Commands/MaskCommand.php index a5bdda5d..9a26f35a 100644 --- a/src/Intervention/Image/Imagick/Commands/MaskCommand.php +++ b/src/Intervention/Image/Imagick/Commands/MaskCommand.php @@ -14,7 +14,12 @@ class MaskCommand extends \Intervention\Image\Commands\AbstractCommand // build mask image from source $mask = $image->getDriver()->init($mask_source); - $mask_size = $mask->getSize(); + + // resize mask to size of current image (if necessary) + $image_size = $image->getSize(); + if ($mask->getSize() != $image_size) { + $mask->resize($image_size->width, $image_size->height); + } $imagick->setImageMatte(true);