Page 1 of 1

Potrace the harsh edges

Posted: 2020-05-11T03:12:41-07:00
by andrew31
Hi guys...

I'm running this script on my images but I'm not happy with the white edges on the images...wondering if I can use potrace to smooth the edges...thank you .

Code: Select all

convert test.jpg -bordercolor white -border 1x1 -fuzz 5% -fill none -floodfill +0+0 white -shave 1x1 test_edited.png
Image

Image

Re: Potrace the harsh edges

Posted: 2020-05-11T10:30:46-07:00
by fmw42
You do not need pot race. You can do that with some blur style antialiasing of the alpha channel. Try

Code: Select all

convert test.jpg -bordercolor white -border 1x1 -fuzz 5% -fill none -floodfill +0+0 white -shave 1x1 -channel a -blur 0x1 -level 50x100% +channel -background pink -flatten test_edited.png
If that looks OK. then remove the -background pink -flatten to have a transparent background.