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() }); }