RMagick从图像中删除白色背景并使其透明 [英] RMagick remove white background from image and make it transparent

查看:132
本文介绍了RMagick从图像中删除白色背景并使其透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从此图像中删除白色背景并使背景透明。所以它只是透明背景上的黑色刻度,导出为png。

I need to remove the white background from this image and make the background transparent. So it's just a black tick on the transparent background exported as a png.

例如。转

进入

任何想法?

推荐答案

convert image.png -matte -fill none -fuzz 1%-opaque white result.png

替换任何白色透明度。模糊选项包括几乎是白色的任何东西。

Replaces anything white with transparency. The fuzz option includes anything that is almost-white.

这篇关于RMagick从图像中删除白色背景并使其透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆