1 stable release
1.0.0 | Oct 17, 2024 |
---|
#121 in Images
160 downloads per month
155KB
83 lines
ndotter
ndotter
is a command-line tool that converts raster bitmap images into N-dot SVG art. It processes the image by mapping black or white pixels into circular "dots" on an SVG canvas. The output can be customized, and the tool supports all major raster image formats.
Features
- Convert bitmap images into SVG art using black or white pixels as the dot base.
- Specify the size of each dot to scale the output SVG.
- Optionally open the generated SVG after conversion.
- Supports common raster image formats (e.g., PNG, JPEG).
Installation
To use ndotter
, ensure you have Rust installed, then clone the repository and run:
cargo install --path .
Usage
ndotter [OPTIONS] --source <SOURCE>
Options
-i, --inversed
: Use black pixels for N-dot art (default: white).--dot-size <DOT_SIZE>
: Set the size of each dot (default: 10, minimum: 1).--open
: Automatically open the generated SVG after creation.-s, --source <SOURCE>
: The path to the source image file (required).-d, --destination <DESTINATION>
: The path to save the generated SVG file. Defaults to<source-image-path>.svg
.
Example
Convert a PNG image to SVG art with a dot size of 15, and open the resulting file:
ndotter --source image.png --dot-size 15 --open
Contributing
Feel free to submit issues or pull requests if you'd like to improve ndotter!
License
This project is licensed under the MIT License.
Dependencies
~4.5MB
~92K SLoC