title: Convert Image to SVG
body: <p>I use <a href="https://xmlgraphics.apache.org/batik/" rel="nofollow">Apache Batik</a> to preview svg documents in a jframe.
  What I want to do is the user to give some Images (e.g. png or jpeg)
  and then my program to turn them into svg documents.</p>
  
  <p>Is this <code>SVGCreator</code> any possible?</p>
  
  <blockquote>
    <p>FileChooser</p>
  </blockquote>
  
  <pre><code>JFileChooser fc = new JFileChooser(".");
    int choice = fc.showOpenDialog(panel);
    if(choice == JFileChooser.APPROVE_OPTION){
      File f = fc.getSelectedFile();
      String filepath = f.toURL().toString();
      SVGDocument document = SVGCreator(filepath);
      SVGViewer(document);
    }
  }
  </code></pre>
  
  <blockquote>
    <p>SVGViewer (extends JFrame)</p>
  </blockquote>
  
  <pre><code>public SVGViewer(SVGDocument document){
    JSVCanvas canvas = new JSVCanvas();
    this.getContentPane().add(canvas);
    canvas.setSVGDocument(document);
    this.pack();
    this.setVisible(true);
  }
  </code></pre>