I'm using Jspain library in this project.
If you then try to flood fill those bitmap shapes with a colour, those grey edge pixels are going to appear like white lines or spots around the edge of the fill.
There are a few things you can do. For example:
You can disable anti-aliasing in your SVG images. Use
shape-rendering="crispEdges"
as a property or CSS style. See: https://www.w3.org/TR/SVG11/single-page.html#painting-ShapeRenderingPropertyRender the SVG. Then run a threshhold or contrast filter over that image to remove the grey pixels.