Php imagick透明提示不起作用
我有一个形象: 我正在使用以下PHP/imagick代码:Php imagick透明提示不起作用,php,transparent,imagick,Php,Transparent,Imagick,我有一个形象: 我正在使用以下PHP/imagick代码: $BackgroundColor = "rgb(255, 255, 203)"; $img = new Imagick(); $img->readImage("xxxxxx"); $img->setImageFormat('png'); $img->transparentPaintImage($BackgroundColor,0,10,false); $img->writeImage("xxxxxxx");
$BackgroundColor = "rgb(255, 255, 203)";
$img = new Imagick();
$img->readImage("xxxxxx");
$img->setImageFormat('png');
$img->transparentPaintImage($BackgroundColor,0,10,false);
$img->writeImage("xxxxxxx");
生成的图像不会将黄色更改为透明。
i、 e.如上图所示,图像保持黄色
任何建议都会被采纳
谢谢
David文档稍微过时了。您需要根据系统/库量程范围计算模糊百分比
$BackgroundColor=“rgb(255、255、203)”;
$img=新的Imagick();
$img->readImage(“xxxxxx”);
$img->setImageFormat('png');
$fuzz=Imagick::getQuantum()*0.1;//10%
$img->transparentpaignage($BackgroundColor,0,$fuzz,false);
$img->writeImage(“xxxxxxx”);
文档稍微过时了。您需要根据系统/库量程范围计算模糊百分比
$BackgroundColor=“rgb(255、255、203)”;
$img=新的Imagick();
$img->readImage(“xxxxxx”);
$img->setImageFormat('png');
$fuzz=Imagick::getQuantum()*0.1;//10%
$img->transparentpaignage($BackgroundColor,0,$fuzz,false);
$img->writeImage(“xxxxxxx”);