0

How can we convert byte array or bitmap to svg in .net and save the svg file. Is there any library provided by .net or any third party library which can handle this.

2
  • This user reported some success using the C# port of the Potrace library. Commented Jun 5, 2019 at 6:17
  • What is in that byte array? A bitmap? Commented Jun 5, 2019 at 7:27

1 Answer 1

0

The problem is that Bimap, JPG, PNG, etc. files are raster graphics: they store a fixed array of pixels in various shades of red, green and blue (or hue, lightness and shade - whatever) while SVG files are vector graphics - which means they store images as "draw line from (x1, y1) to (x2, y2)" and "draw an arc here" commands. And the two are not compatible.

It is possible to do - the process is called "vectorisation" - but the results are unlikely to be perfect, and if you are talking about a natural world object (like a photo of a face) it's very, very unlikely to work without some considerable effort on your part.

read the original article at codeproject.com

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.