Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for putImageData needed #81

Open
Tracked by #13
thulsen opened this issue Jan 5, 2021 · 3 comments
Open
Tracked by #13

support for putImageData needed #81

thulsen opened this issue Jan 5, 2021 · 3 comments

Comments

@thulsen
Copy link

thulsen commented Jan 5, 2021

I would like to save an already created canvas as SVG. My plan was to use getImageData to get the data from the canvas, and then use putImageData to create the SVG file. Unfortunately, canvas2svg does not support putImageData yet. Will this be implemented in the future, or does anyone know another solution?

@murkle
Copy link

murkle commented Jan 5, 2021

  1. this fork seems to be dead, try https://github.com/murkle/canvas2svg/ which has some fixes

  2. you can use drawImage() to plot a bitmap

  3. What you suggest won't make a vector SVG, (just a "fake" SVG with embedded bitmap). As you are using canvas why not just use the library "properly" and send all the drawing calls to both the actual canvas and canvas2svg?

@thulsen
Copy link
Author

thulsen commented Jan 5, 2021

  • this fork seems to be dead, try https://github.com/murkle/canvas2svg/ which has some fixes
  • you can use drawImage() to plot a bitmap
  • What you suggest won't make a vector SVG, (just a "fake" SVG with embedded bitmap). As you are using canvas why not just use the library "properly" and send all the drawing calls to both the actual canvas and canvas2svg?
  1. Thanks.
  2. It’s just some circles with text, not a picture or something.
  3. In that case it’s just as easy to create the SVG by myself, with and elements.

@enoh-barbu
Copy link

enoh-barbu commented Feb 11, 2021

I need that method so badly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants