我发现了这个不错的代码: https://phpimagick.com/Tutorial/backgroundMasking 但我得到相同的图片没有棋盘。我的配置或代码有问题吗?
我最好的工作代码是:
$BackgroundColor = "rgb(255,255,255)";
$img = new Imagick();
$img->readImage('xxxxx.jpg');
$img->setImageFormat('png');
$fuzz = Imagick::getQuantum() * 0.1; // 10%
$img->transparentPaintImage($BackgroundColor,$fuzz,false);
$img->writeImage('xxxx.png');
但没有模糊和遮罩:(
有什么主意吗?