image icon indicating copy to clipboard operation
image copied to clipboard

Transparent backgoround and Imagick

Open akalongman opened this issue 2 years ago • 0 comments

This code works when GD is selected in the config, but does not work on Imagick:

$mask = Image::make('image.gif')
    ->greyscale()
    ->contrast(100)
    ->invert();

$newImage = Image::canvas($mask->width(), $mask->height(), '#000000')
    ->mask($mask, false)
    ->save('image.png', 100);

PHP: 8.2.10 Imagick: 3.7.0 Intervention: 2.7.2

akalongman avatar Oct 02 '23 09:10 akalongman