diff --git a/src/Tools/jaby_engine_fconv/src/images/reduced_tim/mod.rs b/src/Tools/jaby_engine_fconv/src/images/reduced_tim/mod.rs index 52db9fd6..9b089243 100644 --- a/src/Tools/jaby_engine_fconv/src/images/reduced_tim/mod.rs +++ b/src/Tools/jaby_engine_fconv/src/images/reduced_tim/mod.rs @@ -4,7 +4,7 @@ use color_clut::IndexedImage; use color_full16::{RgbaImage, RgbImage}; use std::io::Cursor; use tool_helper::{Error, Input, Output}; -use types::{Header, PSXImageConverter}; +use types::{Header, Color as PSXColor, PSXImageConverter}; mod types; mod color_clut; @@ -51,8 +51,15 @@ fn encode(image: T, clut_align: ClutAlignment, mut output: tool_helper::raw::write_generic(&mut output, header)?; if let Some(palette) = palette { + let mut color_count = pal_width*pal_height; for color in palette { tool_helper::raw::write_generic(&mut output, color)?; + color_count -= 1; + } + + while color_count > 0 { + tool_helper::raw::write_generic(&mut output, PSXColor::black())?; + color_count -= 1; } }