Convert an image to a vector svg also options to filter the original image e g black and white or just the original pattern script src https notebook xbdev net var scripts imagetracer_v1 2 6 js script div id svgcontainer div script document body style minHeight 600px console log typeof typeof ImageTracer ImageTracer imageToSVG https notebook xbdev net var images test512 png callback function to run on SVG string result function svgstr ImageTracer appendSVGString svgstr svgcontainer posterized2 script script src https notebook xbdev net var scripts imagetracer_v1 2 6 js script button onclick downloadsvg Download SVG button br div id svgcontainer div script document body style minHeight 600px console log typeof typeof ImageTracer ImageTracer imageToSVG https notebook xbdev net var images test512 png callback function to run on SVG string result function svgstr ImageTracer appendSVGString svgstr svgcontainer default default posterized1 posterized2 posterized3 curvy sharp detailed smoothed grayscale fixedpalette randomsampling1 randomsampling2 artistic1 artistic2 artistic3 artistic4 download button to download the created svg function downloadsvg var svgData document getElementById svgcontainer outerHTML var svgBlob new Blob svgData type image svg xml charset utf 8 var svgUrl URL createObjectURL svgBlob var downloadLink document createElement a downloadLink href svgUrl downloadLink download newesttree svg document body appendChild downloadLink downloadLink click document body removeChild downloadLink script
https notebook xbdev net var images test512 png callback function to run on SVG string result function svgstr ImageTracer appendSVGString svgstr svgcontainer default default posterized1 posterized2 posterized3 curvy sharp detailed smoothed grayscale fixedpalette randomsampling1 randomsampling2 artistic1 artistic2 artistic3 artistic4 download button to download the created svg function downloadsvg var svgData document getElementById svgcontainer outerHTML var svgBlob new Blob svgData type image svg xml charset utf 8 var svgUrl URL createObjectURL svgBlob var downloadLink document createElement a downloadLink href svgUrl downloadLink download newesttree svg document body appendChild downloadLink downloadLink click document body removeChild downloadLink script