How can I convert 1-pixel-wide raster lines into vectors so they can scale cleanly?

I’m working with very thin raster lines, sometimes just 1 pixel wide, and I want to turn them into vector paths so they can be scaled up without looking low-res or blocky.

The goal is not just normal image upscaling. I want something closer to vector reconstruction from a bitmap line drawing.

What I’m dealing with:

•	input is a raster image

•	lines can be very thin, often 1-pixel wide

•	I want to preserve the overall shape and direction of the lines

•	when scaled up, I want the result to look clean and sharp, not pixelated

What I’m trying to understand:

•	What is the right approach for this?

•	Is this basically tracing / vectorization / skeleton-to-curve fitting?

•	Are there specific algorithms or tools that work well for this kind of input?

•	How do you handle jagged diagonal lines so they become smooth curves or clean vector segments?

•	Is there a way to do this while keeping corners sharp where needed?

I’ve looked at the general idea of image tracing, but most examples seem focused on filled shapes or logos, not single-pixel lines.

I’d appreciate:

•	algorithm suggestions

•	open source tools/libraries

•	papers or keywords to search

•	practical advice from anyone who has done this before

If it helps, you can think of it as trying to turn a thin bitmap edge map into scalable vector lines.

Posted Mar 14, 2026, 3:20 AM UTC

75
Loading comments…