diff --git a/src/lib.rs b/src/lib.rs index bb1273d..9a6ceaf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -186,17 +186,6 @@ fn render_preview(state: &State) -> DynamicImage { .expect("indexed color out-of-range") .into() }); - let mut indexed = buffer.clone(); - for (i, pixel) in buffer.pixels().enumerate() { - // todo get rid of magic numbers! what about Bitsy HD? - let mut pixel = image::Rgba::from(pixel.0); - colour_map.map_color(&mut pixel); - indexed.put_pixel( - (i % 128) as u32, - (i / 128) as u32, - pixel - ); - } } image::DynamicImage::ImageRgba8(buffer)