From 9261c41cd84902792059b21cba644eed3d27d5da Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Sat, 7 Nov 2020 16:31:09 +0000 Subject: [PATCH] tidyup --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 5d42374..5f89bc7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -213,9 +213,10 @@ fn render_preview(state: &State) -> DynamicImage { // todo get rid of magic numbers! what about Bitsy HD? buffer = image::ImageBuffer::from_fn(128, 128, |x, y| -> image::Rgba { let p = indices.get_pixel(x, y); + colour_map .lookup(p.0[0] as usize) - .expect("indexed color out-of-range") + .expect("indexed colour out-of-range") .into() }); }