svg to image(png)
- DecodeSVG
bs := goutils.ReadFile("github.svg")
dbs, err := DecodeSVG(bs)
if err != nil {
t.Errorf("%s", err)
}
if err := icat.ICatRead(bytes.NewReader(dbs), os.Stdout); err != nil {
t.Errorf("%s", err)
}
- DisplaySVG
if err := DisplaySVG(bs); err != nil {
t.Errorf("%s", err)
}
<image id="image0" width="320" height="321" x="0" y="0" xlink:href="data:image/png;base64,iV/>