How rlynx0/colorsort-mosaic works
colorsort-mosaic is a command-line image mosaic generator. The user supplies image directories, an output path, and tile size; the program loads and analyzes images, assigns tiles to a hue/lightness grid, composites the mosaic, and saves it. All runtime behavior is implemented in src/main.rs; the graph reflects the sampled source, with no README available.
Main entry points: main.rs Run workflow
Components 14
Image preparation
- Directory scan
src/main.rs - Image decode
src/main.rs - Prepare tiles
src/main.rs - Color analysis
src/main.rs
Mosaic generation
- Build mosaic
src/main.rs - Grid sizing
src/main.rs - Tile assignment
src/main.rs - Color distance
src/main.rs
CLI and feedback
- CLI options
src/main.rs - Run workflow
src/main.rs - Progress display
src/main.rs
Other components
- User
- Image directories
- Mosaic image
Connections 14
- User → CLI options: sets options
- CLI options → Run workflow: provides options
- Run workflow → Image directories: reads entries
- Run workflow → Directory scan: scans directories
- Run workflow → Image decode: decodes entries
- Run workflow → Prepare tiles: processes images
- Image decode → Prepare tiles: returns images
- Prepare tiles → Color analysis: computes colors
- Prepare tiles → Progress display: updates status
- Run workflow → Build mosaic: builds from tiles
- Build mosaic → Grid sizing: chooses dimensions
- Build mosaic → Tile assignment: assigns tiles
- Tile assignment → Color distance: scores matches
- Run workflow → Mosaic image: saves image