updated example in readme
This commit is contained in:
parent
e1d90c5747
commit
12fa7dd703
1 changed files with 5 additions and 4 deletions
|
|
@ -5,10 +5,11 @@ 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> {
|
fn test_big_image() -> Result<(), ImageError> {
|
||||||
let src: RgbaImage = image::open("some_image.jpg").unwrap().into_rgba8();
|
let src: RgbaImage = image::open("some_image.jpg").unwrap().into_rgba8();
|
||||||
|
let dest = quantize(&src, 256);
|
||||||
let out = quantize(&src, 256);
|
dest.save_with_format("output.jpg", image::ImageFormat::Jpeg)?;
|
||||||
out.save_with_format("output.jpg", image::ImageFormat::Jpeg)?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
```
|
||||||
Loading…
Add table
Reference in a new issue