feat: wire up image conversion pipeline and CLI

Add `convert.rs`: a SIMD nearest-color search and a rayon-parallel
`nordify_pixels` function. Add `error.rs` with the `NordifyError` type.

Rewrite `lib.rs` to expose `NordifyOptions`, `nordify_image`, and
`nordify_file` as the public API. Rewrite `main.rs` to parse CLI
arguments with `argh` and call into `lib.rs`.

Add `argh` and `thiserror` as dependencies.
This commit is contained in:
2026-08-28 13:33:52 +02:00
parent e93bc547f2
commit 7bc3268607
5 changed files with 497 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
use thiserror::Error;
#[derive(Debug, Error)]
pub enum NordifyError {
#[error("failed to read or write image: {0}")]
Image(#[from] image::ImageError),
}
pub type Result<T> = std::result::Result<T, NordifyError>;