Open alu opened 4 years ago
Can you provide an image that triggers the error ? If possible, the image should not be copyrighted so that it can be redistributed freely with the test data for this repository.
@lovasoa
Sorry, i can't do it because images that the problem occurs are owned by our customers. I looking for user of those hardware in my company but probably not present.
I had the same issue with one specific image from my collection. This picture has been taken with a Samsung Galaxy J3 (SM-J320FN).
Version: jpeg-decoder = "0.1"
, compiled with Rust 1.36.0
Code:
fn main() {
let file = File::open("/home/enz/Images/bug_imgrust.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();
}
Error:
thread 'main' panicked at 'failed to decode image: Format("spectral selection is not allowed in non-progressive scan")', src/libcore/result.rs:999:5
For this particular image of my collection, the identify -verbose
command complains with the following message:
identify-im6.q16: Invalid SOS parameters for sequential JPEG `/home/enz/Images/bug_imgrust.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.
I don't know if that SOS stuff can have a relationship with the present problem. Maybe it's just a coincidence, but just in case, it can be worth mentioning.
I can send you the picture by email (I appear in this photo).
Finally I find image which cause this error - 20190821_154545.jpg.zip
+1 -- we're seeing this in our app, too.
spectral selection is not allowed in non-progressive scan
Error.convert
command in Linux displayedInvalid SOS parameters for sequential JPEG
warning but the image was generated successfully.may be relevant