done
This commit is contained in:
parent
45ef41c366
commit
31d7ff52ca
|
@ -166,11 +166,9 @@ fn image_to_base64(image: &DynamicImage) -> String {
|
||||||
|
|
||||||
fn render_preview(state: &State) -> DynamicImage {
|
fn render_preview(state: &State) -> DynamicImage {
|
||||||
let mut buffer = state.image.as_ref().unwrap().clone().into_rgba();
|
let mut buffer = state.image.as_ref().unwrap().clone().into_rgba();
|
||||||
|
let palette_id = state.palette.as_ref().unwrap();
|
||||||
// todo get actual chosen palette
|
let palette = *&state.game.as_ref().unwrap().get_palette(palette_id).unwrap();
|
||||||
let palette_id = state.palette.as_ref().unwrap();
|
let colour_map = crate::ColourMap::from(palette);
|
||||||
let palette = *&state.game.as_ref().unwrap().get_palette(palette_id).unwrap();
|
|
||||||
let colour_map = crate::ColourMap::from(palette);
|
|
||||||
|
|
||||||
let mut buffer = image::imageops::brighten(&mut buffer, state.brightness);
|
let mut buffer = image::imageops::brighten(&mut buffer, state.brightness);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue