I'm trying to use the bg_removal script on an image with a white background, for example this one: http://goo.gl/PQAnLs
The following simple floodfill method yields the expected transparency:
Code: Select all
convert foo.jpg -bordercolor white -border 1x1 -alpha set -channel RGBA -fuzz 3% -fill none -floodfill +0+0 white -shave 1x1 -format png foo.png
Code: Select all
bg_removal foo.jpg white 10 10 foo.png
(my ImageMagick version is 7.0.7-8 Q16 x86_64 2017-10-24)
Thanks,
Viktor