Skip to content

Improve raster image (PNG/JPG) vectorization quality #1

@dconroy

Description

@dconroy

The current browser-based vectorization for converting PNG/JPG to SVG produces low-quality results. It uses a basic canvas tracing method that often loses detail, creates jagged edges, or misinterprets gradients.

Current Behavior:
Uses a simple marching-squares-like algorithm in src/core/imageToSvg.ts.
Traces contours and simplifies paths, but lacks sophistication for handling complex shapes or shading.
Results in "blobby" or overly simplified vector paths that don't represent the original logo well.

Proposed Solution:
Evaluate integrating a more robust client-side tracing library (e.g., potrace port or similar).
Alternatively, investigate WebAssembly-based solutions for better performance and quality.
Consider adding an "advanced mode" or server-side option if client-side limitations are too strict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions