tidyup
This commit is contained in:
parent
6a58e8c003
commit
9261c41cd8
|
@ -213,9 +213,10 @@ fn render_preview(state: &State) -> DynamicImage {
|
||||||
// todo get rid of magic numbers! what about Bitsy HD?
|
// todo get rid of magic numbers! what about Bitsy HD?
|
||||||
buffer = image::ImageBuffer::from_fn(128, 128, |x, y| -> image::Rgba<u8> {
|
buffer = image::ImageBuffer::from_fn(128, 128, |x, y| -> image::Rgba<u8> {
|
||||||
let p = indices.get_pixel(x, y);
|
let p = indices.get_pixel(x, y);
|
||||||
|
|
||||||
colour_map
|
colour_map
|
||||||
.lookup(p.0[0] as usize)
|
.lookup(p.0[0] as usize)
|
||||||
.expect("indexed color out-of-range")
|
.expect("indexed colour out-of-range")
|
||||||
.into()
|
.into()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue