mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 00:29:55 +02:00
mask resizes automatically to current image
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user