Skip to content
This repository has been archived by the owner on Nov 8, 2017. It is now read-only.

Import PNG #3

Open
MagnaMike opened this issue Jan 24, 2014 · 9 comments
Open

Import PNG #3

MagnaMike opened this issue Jan 24, 2014 · 9 comments

Comments

@MagnaMike
Copy link

Can you add the ability to import a png image so you draw a vector image based off of the png? For example I have a png, I import it to the background and draw vector shapes over top of it and then save the svg. The png isn't actually part of the final image, I just want to be able to 'trace' it. Does this make sense?

@Fishrock123
Copy link
Contributor

👍

@artursapek
Copy link
Owner

SVG does support embedding raster images. It's a good idea.

@MagnaMike
Copy link
Author

So it won't be too hard to implement?

@jarek-foksa
Copy link

You could add support for embedding of PNG files via drag & drop with something like this: https://gist.github.com/jarek-foksa/8613003

@MagnaMike
Copy link
Author

Thank you, but sorry, how do I use this?

@jarek-foksa
Copy link

@MagnaMike the gist just demonstrates how to use the DOM API in order to implement this functionality, it's not supposed to work out of the box (it's not even CoffeeScript).

@MagnaMike
Copy link
Author

Sorry all of this is going over my head, I don't have any real experience to speak of with this kind of stuff. I'll just ask this; is this functionality something you can/will add on in the future?

@Fishrock123
Copy link
Contributor

Yes.

@artursapek
Copy link
Owner

It could be done with drag & drop, with an upload field, with a url field...

The input isn't as important as the internal representation class that would have to be written for the <image> element. It will have to extend Monsvg like every other SVG element representation class (see the entire src/geometry directory). That's how Mondrian handles all SVG elements.

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

No branches or pull requests

4 participants