JPG - > PNG发布外部背景(JPG -> PNG Release outer background)
我确实有一些文章图片,这里作为一个镜子的例子。 当然可以有其他几何形状,如瓶子,椅子。
图片均为JPEG格式。 我想将这些文件转换为PNG格式。 但我想摆脱外部的白色背景。
有没有办法通过php或者ImageMagick中的脚本来做到这一点?
I do have fowllowing article pics, here as an example a mirror. Of course there can be other geometric forms like bottles, chairs.
The pictures are all in JPEG-format. I want to convert these files to PNG-format. But I want to get rid of the outer white background.
Is there a way to do it by script in php oder ImageMagick?
最满意答案
你可以这样做:
convert frame.jpg -fuzz 10% -fill none -draw 'color 10,10 floodfill' result.png我在这里用红色画了效果所以你可以看到它。
You can do it like this:
convert frame.jpg -fuzz 10% -fill none -draw 'color 10,10 floodfill' result.pngI have drawn the effect in red here so you can see it.
更多推荐
发布评论