Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 990 Bytes

isvg.md

File metadata and controls

39 lines (27 loc) · 990 Bytes

ISVG

svg to image(png)

usage

  • 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/>