P
P
pythonist12342020-05-14 19:20:04
SVG
pythonist1234, 2020-05-14 19:20:04

How to get svg-border (polygon) from an image?

A picture is given (it consists of pixels of two colors, "background", and ordinary pixels).
We need to get the svg border (i.e. the coordinates for the polygon), so that the svg type

<svg width="500" height="420"><polygon points="координаты" fill="orange" stroke="black"></polygon></svg>
gave the same picture, but filled (it is necessary that the inside of the "image" in the picture is filled, and not what is outside of it) with the given color (in this example, let's say orange).
Example:
It e0a1b1460176b2204a07d752e5df0f0f.pngshould look something like this .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daria Motorina, 2020-05-14
@glaphire

You can call Inkscape via the command line to convert a bitmap to svg, there are examples on the Internet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question