Can anyone help... how to convert Image to Vectors (SVG) through Javascript.......! Any help will be awesome....!
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
I too was looking for a simple conversion from image to svg - however it is not that easy, but I did find a tool which could take simple images (black and white) and transform them into svg files, also result was much nicer, since it somehow smooth the edges out - however when trying with color images, it did not work. If you want to make simple images and then later tranform into svg, then using an online converter could help you
I used this to convert a couple of simple .png images to .svg
http://image.online-convert.com/convert-to-svg
Three options
Use Online convert's API
http://apiv2.online-convert.com/
Run your own node.js server and use Potrace or AutoTrace
https://www.npmjs.com/package/potrace used by Online convert https://www.npmjs.com/package/autotrace
Or use imagetracerjs client side.
https://github.com/jankovicsandras/imagetracerjs
What you're asking isn't really possible. I mean, you could try to do it, but I doubt the results would be particularly satisfying.
SVG to JPEG is a one-way conversion; converting a raster image to a vector image is non-trivial, see this question.