This commit is contained in:
Max Bradbury 2020-11-07 16:31:09 +00:00
parent 6a58e8c003
commit 9261c41cd8
1 changed files with 2 additions and 1 deletions

View File

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