image-rs / image

Encoding and decoding images in Rust
Apache License 2.0
4.9k stars 606 forks source link

JPG image first two bytes are not an SOI marker #2280

Closed nricciardi closed 2 months ago

nricciardi commented 3 months ago

Decoding a JPG image using:

let image = ImageReader::open(src_pathbuf.clone())?.decode();

It returns error: Format error decoding Jpeg: invalid JPEG format: first two bytes are not an SOI marker

I can open image correctly on my system.

Following the image:

egp-igp

fintelia commented 3 months ago

I think this is a duplicate of https://github.com/image-rs/image/issues/1233. In particular, the file you've attached is a PNG but the filename suggests otherwise