Crates.io | kmeans-color-gpu-cli |
lib.rs | kmeans-color-gpu-cli |
version | 0.1.0 |
source | src |
created_at | 2023-09-26 18:40:36.132206 |
updated_at | 2023-09-26 18:40:36.132206 |
description | Command line tool to use the color-quantization-gpu library |
homepage | |
repository | https://github.com/redwarp/k-means-gpu |
max_upload_size | |
id | 983952 |
size | 60,801 |
Calculate the k average colors in an image using k-means clustering, leveraging your gpu to do the heavy lifting.
Totally 100% inspired by kmeans-colors.
As this loads an image as a texture to your graphic cards, it also comes with some limitation based on the GPU backends: It won't work if the original image is bigger than 8192x8192 pixels.
cargo run --release -- reduce -i .\gfx\tokyo.png -c 8
cargo run --release -- reduce -i .\gfx\tokyo.png -c 8 -m dither
cargo run --release -- palette -i .\gfx\tokyo.png -c 8 -s 40
cargo run --release -- find -i .\gfx\tokyo.png -p "#050505,#ffffff,#ff0000"
cargo run --release -- find -i .\gfx\tokyo.png -p "#050505,#ffffff,#ff0000" -m dither
cargo run --release -- find -i .\gfx\tokyo.png -p .\gfx\apollo-1x.png -m dither
I had to read a bunch of stuff to even start to make sense of it all.
MIT