0

I am using an svg-edit tool and want convert an image(jpg or png) to svg before loading it into the editor.

Loading an SVG file is possible but others file types can not be loaded so I think the image must be converted before being loaded.

How can I convert a jpg to SVG in Java (or javascript, jquery)?

StillLearnin
  • 1,391
  • 15
  • 41
Hyeok
  • 1
  • 2

2 Answers2

0

Importing a .jpg works for me, but takes a while to load. And it is still an embedded jpg, not an svg. I guess converting it in svg-edit is not intended at the moment.

Easiest alternative would be to download Inkscape.

  • import the .jpg/.png file
  • select the imported image file
  • press Shift+Alt+B or go to "Path", "Trace Bitmap..."
metanerd
  • 713
  • 1
  • 6
  • 21
0

I have created this project https://github.com/piercus/nodeJpg2SVG using potrace

piercus
  • 1,136
  • 9
  • 17