Converts images into commands for dwangoAC's Paint By Numbers, with some built-in image manipulation utilities.
This crate has a command-line interface for humans and scripts (documented here) and an API for Rust programs (external docs).
The latest release of crate is published on crates.io, making it easy to run if you have Rust installed:
$ cargo install pbnify
If you want to test/develop on the latest master branch, you can build it with
Cargo, and then run with $ cargo run -- ...
instead of $ pbnify ...
:
$ git clone https://gitlab.com/agausmann/pbnify.git
$ cd pbnify
$ cargo build
To convert an image's raw data into PBN commands:
``` $ pbnify -i my_image.png
... ```
To move the top-left corner of the image to a different location:
$ pbnify -i my_image.png -x 40 -y 30
...
To scale the given image before generating PBN:
$ pbnify -i my_image.png -w 132 -H 99
...
To quantize an image (reduce the number of unique colors; in this case, to 16):
$ pbnify -i my_image.png -n 16
...
``` USAGE: pbnify [OPTIONS]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-H, --height
Copyright (C) 2019 Adam Gausmann
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.