You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just trying this crate with the simple example on the main webpage. When running it with cargo run, everything was perfect as expected. But when I ran it with cargo run --release, it panicked:
thread 'main' panicked at 'failed to open file: Decoding(DecodingError { format: Exact(Jpeg), underlying: Some(Format("invalid length in DHT")) })', src/main.rs:12:35
and I tried a lot of different jpgs, always the same result.
I am wondering is this a bug or something?
The text was updated successfully, but these errors were encountered:
extern crate jpeg_decoder as jpeg;
use std::fs::File;
use std::io::BufReader;
fn main() {
let file = File::open("test.jpg").expect("failed to open file");
let mut decoder = jpeg::Decoder::new(BufReader::new(file));
let pixels = decoder.decode().expect("failed to decode image");
let metadata = decoder.info().unwrap();
}
I just copied the example and changed the name of the image to mine. The image was downloaded from the Internet and attached below.
P.S. My OS is Archlinux, rust compiler version is 1.54.0
I was just trying this crate with the simple example on the main webpage. When running it with
cargo run
, everything was perfect as expected. But when I ran it withcargo run --release
, it panicked:and I tried a lot of different jpgs, always the same result.
I am wondering is this a bug or something?
The text was updated successfully, but these errors were encountered: