I'm using ImageMagick to convert an svg file to png but the output file shows strange black borders that the original file doesn't have. I tried to figure out which delegate that ImageMagic uses for svg conversion, which is rsvg-convert.
convert -list delegate | grep sv
svg => "rsvg-convert' -o '%o' '%i"
But the interesting thing is when I use rsvg-convert directly, the converted image looks fine without the weird black borders
The below command results in the correct png
rsvg-convert accessible.svg -o accessible.png
The below command results in a corrupted png file with black borders
convert accessible.svg accessible.png
[output using ImageMagic]
[output using rsvg-convert]
This is the code of the original svg file
<svg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'>
<title><![CDATA[accessible]]></title>
<path d='M8,0h84c4,0,8,4,8,8v84c0,4-4,8-8,8h-84c-4,0-8-4-8-8v-84c0-4,4-8,8-8' fill='#FFF' stroke='#000' stroke-width='1' fill-rule='evenodd'/>
<path d='M8,3h84c3,0,5,2,5,5v84c0,3-2,5-5,5h-84c-3,0-5-2-5-5v-84c0-3,2-5,5-5' fill='#003f87' fill-rule='evenodd'/>
<path d='M72,82l-5-13l-6-12h-13h-13c0,0-1-9-1-19l-2-19l-1-3c0-4,3-7,6-7c1-1,2-1,3,0c2,0,4,1,5,3l1,4c0,2-1,4-3,6l-3,1h-1l1,15h9h10v4v3h-9h-9v1v2v2h3h22l5,12l5,13l4-2l4-1l2,5l-14,6v-1M72,82l-5-13l-6-12h-13h-13l-1-19l-2-19l-1-3c2-18,27,0,9,7h-1l1,15h9h10v4v3h-9h-9v1v2v2h3h22l5,12l5,13l4-2l4-1l2,5l-14,6v-1M66,77l-5-9c-8,35-59,5-29-20l-1-9c-40,22,5,81,35,38' fill='#FFF' fill-rule='evenodd'/>
</svg>