LineForge is a Windows‑only batch image processing pipeline that now uses a native Rust engine (vpipe-cli) for all heavy‑lifting. No external binaries such as ImageMagick, Potrace, or Inkscape are required.
- Python 3.10+ (ensure
pythonorpyis in your PATH). - Rust & Cargo (required to compile the native Rust engine).
To compile the Rust engine and bundle the entire application (Python script, UI assets, and the Rust engine) into a single, self-contained Windows executable, run the provided PowerShell build script:
# Run the release build script
.\build_release.ps1What the script does:
- Automatically compiles the Rust engine (
lineforge_engine) in release mode using Cargo. - Places the compiled binary under
bin\vpipe-cli.exe. - Upgrades pip and installs the necessary Python dependencies (
requirements.txt) and PyInstaller. - Packages everything into a single-file executable using PyInstaller.
- Outputs the final executable at
dist_release\LineForge.exe.
If you want to run the project directly from source:
- Build the Rust engine:
cd lineforge_engine cargo build --release cd .. - Copy the binary into the expected search path:
# Create the bin folder if it doesn't exist if (!(Test-Path bin)) { New-Item -ItemType Directory -Path bin } # Copy the compiled executable and rename it to vpipe-cli.exe Copy-Item lineforge_engine\target\release\vpipe-cli.exe bin\vpipe-cli.exe
- Install Python dependencies:
pip install -r requirements.txt - Run the application:
python main.py
LineForge is a modular batch image processing pipeline for preparing raster artwork for vectorisation, icon refinement, and dataset clean‑up. It provides:
- Image preprocessing – performed with Python Pillow (no external tools).
- Square padding / resizing.
- Raster → Vector tracing – performed by the Rust
vpipe-cliengine, outputting SVG, PDF, or EPS. - ICO round‑trip support – extract, process, and rebuild ICOs using Pillow only.
Formats:
- PNG
- JPG / JPEG
- WEBP
- BMP
- TIFF
- ICO (optional handling)
Input sources:
- Single file
- Folder
- Folder (recursive)
The UI displays:
Found: X inputs
If zero files are found, enable recursive mode when selecting a parent folder.
Each stage can be enabled or disabled independently.
Uses Pillow for:
- Grayscale
- Auto‑level
- Contrast stretch
- Median filter
- Blur
- Negate
- Threshold (slider)
Outputs to output/01_preprocessed
- Square resize
- Background: white / black / transparent
- Output format: PNG or JPG
- JPEG quality control
Outputs to output/02_padded
Uses the Rust engine (vpipe-cli) to produce vector formats directly.
Options:
- Threshold cutoff
- Invert before threshold
- Turdsize
- Smooth toggle (default smooth,
--flatdisables) - Output format:
svg,pdf, oreps
Outputs to output/03_vector
If you need a raster export of the vector output, the Rust engine can also render PNGs directly. Select the desired export format in the UI.
When enabled:
.icofiles are extracted into PNG frames.- Frames are processed through the selected stages.
- Processed frames are rebuilt into a new
.ico.
Final icons land in output/05_ico and temporary extracted frames can be found in output/_ico_frames.
output/
├── 01_preprocessed/
├── 02_padded/
├── 03_vector/ (SVG/PDF/EPS)
├── 04_export_png/ (optional PNG export)
├── 05_ico/ (if enabled)
└── _ico_frames/ (temporary)
The only external requirement is the Rust engine bundled as vpipe-cli.exe (automatically built or provided in releases). All other processing is performed with the standard Python library and Pillow.
Each run creates a timestamped log file in:
logs/
The UI provides shortcuts to:
- Open output folder
- Open last log
- Clear log