Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“Corrupt RLE data” on simple BMP #2321

Open
SabrinaJewson opened this issue Sep 10, 2024 · 0 comments
Open

“Corrupt RLE data” on simple BMP #2321

SabrinaJewson opened this issue Sep 10, 2024 · 0 comments

Comments

@SabrinaJewson
Copy link

Load the following image using image::load_from_memory : image.zip

The image was generated from this PNG
simple
using ImageMagick: magick simple.png simple.bmp. It loads successfully in a different image viewer I tried, so I have reason to believe it’s a valid image. Example code:

fn main() -> anyhow::Result<()> {
    let bytes = fs::read("simple.bmp")?;
    image::load_from_memory(&bytes)?;
    Ok(())
}
use std::fs;

Expected

Loading succeeds.

Actual behaviour

Error: Format error decoding Bmp: Corrupt RLE data

Caused by:
    Corrupt RLE data

(as a side note, it looks like there’s a bug in the error printing that causes (a) the error message to start with an uppercase letter, which goes against convention, and (b) the error message to be duplicated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants