Raster Artwork to SVG
Trace logos and flat artwork into real SVG paths with a limited color palette.
Try an example: Trace a simple red image
How it works
Upload a PNG, JPEG or WebP and trace sampled pixels into editable polygonal SVG paths. Set color count or a custom palette, switch to black and white, remove a border color and drop small regions. The file tool uploads to the server; Lumina Vector Lab runs locally.
- Exact polygonal outlines of sampled pixels; collinear vertices are removed. No bitmap is embedded in the SVG. Curves are not fitted.
- Colors use nearest Euclidean encoded-sRGB distance. Alpha is thresholded to opaque or transparent. Small connected regions are dropped to transparency, not merged.
- Border removal deletes every region of the most frequent opaque border color, including interior regions of that color. Ties use the first palette color.
- At most 512 pixels per side, 2048 shapes and 60000 nodes. Use logos, icons or flat artwork; photographs may need fewer colors and lower sampling.
- Decode the first image, auto-orient, convert to 8-bit sRGB, and downsize to 512 pixels per side before nearest-center sampling. Automatic colors reuse Lumina Palette Studio histogram extraction. Four-connected flood fill labels each region, directed boundary edges form closed rings, and even-odd fill preserves holes.
Sources
- Vector Magic: raster-to-vector workflow inspiration (Vector Magic)
- SVG paths and fill rules (W3C)
Related tools
- Binary Silhouette to SVG – Turn a binary pixel grid into exact SVG outlines with transparent holes.
- SVG Optimizer – Shrink and sanitise SVG files: strip editor junk and scripts, round numbers, minify paths.
How to trace raster artwork into SVG
Upload a logo or flat illustration, pick colors and detail, and download genuine SVG paths with transparent holes.
What it is for
A logo that only exists as a PNG or JPEG gets blurry when you enlarge it, and you cannot change one color without repainting it. This tool traces the image into real SVG paths: one path per connected color region, with holes kept transparent. You can then scale the file freely or recolor shapes in any vector editor.
It works best on flat artwork: logos, icons, badges, stickers and simple illustrations with a few solid colors. Photographs turn into posterized color areas. The outlines follow the sampled pixels and are not smoothed into curves, so diagonal edges keep small steps.
The image is uploaded to the server (PNG, JPEG or WebP, up to 8 MB and 16 megapixels). To trace on your own device, preview the result and recolor shapes one by one, use Lumina Vector Lab.
Worked example
The input is an 800 × 600 PNG: a cream background, a dark teal ring whose lower edge sits on a wide orange bar, and soft anti-aliased edges.
With the defaults (6 automatic colors, 256-pixel sampling) the summary reads "Traced 4 vector shapes with 912 path nodes on the 256 × 192 grid." It also reports 309 dropped pixels: the extra automatic colors went to the blended edge pixels, and their small regions were removed.
Setting Automatic color count to 3 matches the artwork better: still 4 shapes, now 916 path nodes, 2 transparent holes and only 51 dropped pixels. The palette table lists #F5E8CD, #245258 and #D56843.
For a sticker without the cream background, switch Background to Remove dominant border color. The result has 2 shapes (ring and bar), 1 transparent hole, 460 path nodes, and a note says that the border color #F5E8CD was removed everywhere. The cream inside the ring is gone as well, because border removal deletes that color everywhere.
How to read the result
- Shapes counts the paths in the SVG. Each connected region of one color is one shape.
- Transparent holes counts enclosed openings, like the middle of the ring.
- Path nodes shows how complex the outlines are; higher sampling gives more nodes (1834 for the same logo at 512 pixels).
- Dropped pixels were in regions smaller than the minimum size. They become transparent, so a high number can mean thin gaps along edges.
- Sampled grid is the size of the traced grid and of the SVG viewBox.
- The palette table shows each color and how many shapes use it; 0 means all its regions were dropped.
Tips and common mistakes
- Set the color count to the number of colors you can actually see. Extra colors are spent on edge blends.
- For brand colors, type them into Custom HEX palette (2–16 values, such as
#245258 #D56843). Every pixel is then assigned to the nearest of those colors. - Drop regions smaller than at 0 keeps every speck: the same logo with an exact palette jumps from 4 to 55 shapes.
- Black and white uses the luminance threshold. In that mode the orange bar counts as white and disappears together with a removed background.
- Start at 256 pixels and go higher only if small details are missing. Results over 2048 shapes or 60000 nodes are refused.
- Transparent pixels below Minimum visible alpha are left out, which helps with PNG logos that already have a transparent background.
FAQ
Does the SVG contain my original image?
No. It contains only path geometry and fill colors; no bitmap is embedded. The upload is used to compute the result.
Why are the edges stepped instead of smooth?
The tracer keeps the exact boundaries of the sampled pixels and does not fit curves. Higher sampling makes them smaller.
Can I get EPS, DXF or CMYK output?
No, the output is an sRGB SVG. Convert it in a vector editor if you need other formats.
What if my artwork is already a black-and-white grid?
Use Binary Silhouette to SVG: paste rows of 0 and 1 and get exact outlines without uploading an image.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://luminarastervectorizer.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://luminarastervectorizer.usefulweb.site/mcp· tool namelumina_raster_vectorizer
Example request
curl -s -X POST https://luminarastervectorizer.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"image":{"filename":"sample.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEX/////AADrWueTAAAAEklEQVQI12NgIBb8/09dgjgAAPcnH+GApkH4AAAAAElFTkSuQmCC"}}'