remove extraneous colour index stuff
This commit is contained in:
parent
31d7ff52ca
commit
db3cdf42ff
11
src/lib.rs
11
src/lib.rs
|
@ -186,17 +186,6 @@ fn render_preview(state: &State) -> DynamicImage {
|
||||||
.expect("indexed color out-of-range")
|
.expect("indexed color out-of-range")
|
||||||
.into()
|
.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)
|
image::DynamicImage::ImageRgba8(buffer)
|
||||||
|
|
Loading…
Reference in New Issue