Skip to content

Replace PNG/SVG upload with an Image import wizard (5+ image-to-lines algorithms) #4

Description

@BernardJen

Summary

Replace the current separate upload PNG / upload SVG actions with a single "Upload image" entry that opens an import wizard. The wizard lets the user adjust the image and choose how it is converted to plottable lines, with at least 5 conversion algorithms.

Motivation

The current flow exposes two distinct upload paths and limited conversion control. A unified wizard makes import discoverable and gives the user control over the line-conversion result before committing to a plot.

Wizard flow

  1. Upload image (raster or vector).
  2. Adjust the image — basic edits such as: crop, scale/fit, rotate, brightness/contrast, threshold, invert.
  3. Choose conversion algorithm with a live preview of the resulting lines.
  4. Tune algorithm parameters (e.g. line spacing, threshold, density).
  5. Confirm — paths are added to the canvas.

Algorithms (at least 5)

Suggested set (final list TBD during design):

  1. Edge detection / outline tracing
  2. Horizontal/vertical/diagonal hatching by brightness
  3. Crosshatch (multi-angle hatching by tone)
  4. Dithering / stippling (dots)
  5. Contour / iso-level lines
  6. Centerline / skeleton tracing (bonus)

Acceptance criteria

  • A single "Upload image" action replaces the separate PNG and SVG uploads.
  • The wizard supports basic image adjustments before conversion.
  • At least 5 selectable image-to-lines algorithms are available.
  • Each algorithm shows a live preview and exposes its key parameters.
  • Confirming the wizard adds the generated paths to the canvas.

Notes

Current conversion logic lives under src/plot/ (raster.ts, svg.ts, detail.ts); reuse/extend where possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions