IonicaBizau / img-to-svg

Convert the image pixels in SVG squares.
MIT License
40 stars 12 forks source link

Can't open the SVG anywhere #12

Open johnnyshankman opened 2 years ago

johnnyshankman commented 2 years ago

SVG doesn't preview in OSX and when I open in browser it renders as a raw XML file.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<svg width="430" height="430">
<rect x="0" y="0" width="10" height="10" fill="rgb(31, 46, 61)"/>
<rect x="10" y="0" width="10" height="10" fill="rgb(31, 46, 61)"/>
<rect x="20" y="0" width="10" height="10" fill="rgb(31, 46, 61)"/>
....
johnnyshankman commented 2 years ago

I believe the namespace is incorrect.

xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" must be added to the outer svg tag.