我正在尝试将图像的所有白色背景(使用插件从 Html 生成)转换为透明,以便我可以将其用作图章
Using image As MagickImage = New MagickImage(filenamelocation)
image.Alpha(AlphaOption.Set)
image.ColorFuzz = New Percentage(40)
image.Settings.BackgroundColor = MagickColors.Transparent
image.Settings.FillColor = MagickColors.White
image.FloodFill(MagickColors.Transparent, 0, 0)
image.Write(Path.Combine(Server.MapPath("~/Uploads/attachment/"), "stampimagename.png"))
End Using
我正在使用 ImageMagick nuget 包做同样的事情,需要将所有白色转换为透明只有蓝色项目显示仍然存在,有人可以建议我做错了什么