"no marker found where RST2 was expected" error on decoding a damaged-but-readable JPEG file
This happens in image from git, revision 092db1e21b3e8736711e2cbe1d9b5245613756c1
Expected
Image decodes successfully
Actual behaviour
thread 'main' panicked at 'called Result::unwrap() on an Err value: Decoding(DecodingError { format: Exact(Jpeg), underlying: Some(Format("no marker found where RST2 was expected")) })', src/main.rs:3:18
Reproduction steps

fn main() -> std::io::Result<()> {
let path = std::env::args().skip(1).next().unwrap();
let image = image::io::Reader::open(path)?.guess_format().decode().unwrap();
Ok(())
}
The image has some artifacts, the file is likely damaged but the C implementation tries to decode this anyway. Since it's an edge case it's probably low priority.
yes, I have the same issue with different images.
Same issue here, really unclear as to how to debug this. Any update @Shnatsel ?
Another example picture:
zune-jpeg can handle such images instead of panicking, so #1877 will fix this. It is expected to ship in the next semver-breaking release.