From e1d90c5747424f0d65fb20aa20ee8c857d78a9db Mon Sep 17 00:00:00 2001 From: Sander Hautvast Date: Mon, 24 Jan 2022 22:36:26 +0100 Subject: [PATCH] added example to readme --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d2877f8..6021cd9 100644 --- a/README.md +++ b/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 \ No newline at end of file +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(()) +} \ No newline at end of file