added example to readme
This commit is contained in:
parent
ec636f160b
commit
e1d90c5747
1 changed files with 9 additions and 1 deletions
10
README.md
10
README.md
|
|
@ -3,4 +3,12 @@ Does quantization in pure rust on Rgba image, using https://crates.io/crates/ima
|
|||
algorithm:
|
||||
https://observablehq.com/@tmcw/octree-color-quantization
|
||||
|
||||
inspired by to https://github.com/objectProfessionals/movieMaps
|
||||
inspired by to https://github.com/objectProfessionals/movieMaps
|
||||
|
||||
fn test_big_image() -> Result<(), ImageError> {
|
||||
let src: RgbaImage = image::open("some_image.jpg").unwrap().into_rgba8();
|
||||
|
||||
let out = quantize(&src, 256);
|
||||
out.save_with_format("output.jpg", image::ImageFormat::Jpeg)?;
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue