Skip to content

Support importing a svg into the SVG object #57

Open
@hhhapz

Description

@hhhapz

Would be really cool if we could get functionality that allowed us to take an already existing svg (a file, for example) and import it into svgo and modify it!

This would be really helpful when working with large preexisting svgs and adding dynamic content on top of it :)

Here how I envision it to be used:

buf, err := os.OpenFile("my.svg")
if err != nil {
  return err
}
canvas, err := svg.Import(buf, os.Stdout)
if err != nil {
  return err
}
canvas.DoAwesomeThings(...)
// ...
canvas.End() // my.svg with awesome things done to it printed to stdout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions