Convert imag (JPG, PNG) to vector (SVG)
Hi guys I want upload image to my web, but I want that image automatic convert to svg file, can you help me ? I using visual studio 2015. please give me tutorial guys
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manav PandyaRank #166 · 14.3K reputationPosted Jan 5, 2018, 10:52 PM EST
Mega Anaska155 reputationPosted Jan 7, 2018, 3:58 PM EST
Janat AlJamal114 reputationPosted Dec 17, 2019, 5:53 AM EST
Marvin ReidRank #1,963 · 746 reputationPosted Jan 23, 2024, 11:32 AM EST
You can perform this conversion by using the DocumentConverter class in the applications back-end service. This has a built in OCR engine which you'll need to leverage since you are wanting to convert to a Vector based image. The ability to extract the text from the original file allows this converison to happen. Here is an example which shows how you can convert to SVG:
using (DocumentConverter documentConverter = new DocumentConverter()) { var input = @"C:\Input\input.png"); // supports both JPG and PNG var output = @"C:\Output\output.svg"); var jobData = DocumentConverterJobs.CreateJobData(input, output, DocumentFormat.Svg); jobData.JobName = "Convert to Svg"; var documentWriter = new DocumentWriter(); documentConverter.SetDocumentWriterInstance(documentWriter); var renderingEngine = new AnnWinFormsRenderingEngine(); documentConverter.SetAnnRenderingEngineInstance(renderingEngine); var job = documentConverter.Jobs.CreateJob(jobData); documentConverter.Jobs.RunJob(job); }https://www.leadtools.com/help/sdk/tutorials/dotnet-console-convert-files-with-the-document-converter.html