Prerequisites
Bug Description
I am observing a color channel discrepancy when decoding certain BLP1 files using wow_blp.
In the specific case of yellowaura.blp (attached), the texture appears Yellow when rendered within the Warcraft III game engine. However, when decoded using wow_blp::convert::blp_to_image, the resulting output is Cyan.
If I manually swap the Red and Blue channels of the decoded buffer in my code, the output correctly becomes Yellow, matching the in-game appearance.
Expected Behavior
I expected blp_to_image to output a Yellow image for yellowaura.blp, consistent with its appearance in Warcraft III. However, the current output is Cyan, suggesting the Red and Blue channels might be swapped during the decoding of this specific BLP1 file.
Steps to Reproduce
use image::{ImageBuffer, Rgba};
use wow_blp::convert::blp_to_image;
use wow_blp::parser::load_blp;
pub fn main() {
let blp_file = load_blp("data/archives/yellowaura.blp").unwrap();
let image = blp_to_image(&blp_file, 0).unwrap();
image.save("data/output/output.png").unwrap();
let mut flip_rgb_image: ImageBuffer<Rgba<u8>, Vec<u8>> = image.clone().into();
for pixel in flip_rgb_image.pixels_mut() {
let Rgba([r, g, b, a]) = *pixel;
*pixel = Rgba([b, g, r, a]);
}
flip_rgb_image.save("data/output/flip_rgb_image.png");
}
Version
0.3.2
Rust Toolchain
rustc 1.89.0 (29483883e 2025-08-04)
Operating System
Linux
Cargo Output
Backtrace
Additional Context
Supporting Files
I have attached a ZIP archive containing:
yellowaura.blp: The original source file.
output.png: The direct output from wow_blp.
flip_rgb_image.png: The output after I manually performed an in-place R/B channel swap.
yellowaura.zip
Prerequisites
Bug Description
I am observing a color channel discrepancy when decoding certain BLP1 files using
wow_blp.In the specific case of
yellowaura.blp(attached), the texture appears Yellow when rendered within the Warcraft III game engine. However, when decoded usingwow_blp::convert::blp_to_image, the resulting output is Cyan.If I manually swap the Red and Blue channels of the decoded buffer in my code, the output correctly becomes Yellow, matching the in-game appearance.
Expected Behavior
I expected blp_to_image to output a Yellow image for yellowaura.blp, consistent with its appearance in Warcraft III. However, the current output is Cyan, suggesting the Red and Blue channels might be swapped during the decoding of this specific BLP1 file.
Steps to Reproduce
Version
0.3.2
Rust Toolchain
rustc 1.89.0 (29483883e 2025-08-04)
Operating System
Linux
Cargo Output
Backtrace
Additional Context
Supporting Files
I have attached a ZIP archive containing:
yellowaura.blp: The original source file.output.png: The direct output fromwow_blp.flip_rgb_image.png: The output after I manually performed an in-place R/B channel swap.yellowaura.zip