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
This happens in the latest public release of this crate on this date, i.e. 0.25
Expected
Should be able to decode the image incase the Limit is turned off (using reader.no_limits()) or set to > 16384 (custom Limit with max_image_width and max_image_height set to the desired amount, 26560 in my case)
Actual behaviour
Fails with error message from zune_jpeg crate: Error: Decoding(DecodingError { format: Exact(Jpeg), underlying: Some("Image width 26560 greater than width limit 16384. If use `set_limits` if you want to support huge images") })
Reproduction steps
Provide source code, a repository link, or steps
use std::io::BufReader;use std::fs::File;fnmain() -> Result<(),Box<dyn std::error::Error>>{letmut reader = image::io::Reader::new(BufReader::new(File::open("./canvas.jpg")?));// image with res 26560x26560// let mut limits = image::io::Limits::default();// limits.max_image_width = Some(30000);// limits.max_image_height = Some(30000);// reader.limits(limits);
reader.no_limits();
reader = reader.with_guessed_format()?;let _img = reader.decode()?;Ok(())}
Generated canvas.jpg for testing using Imagemagick with command below: convert -size 26560x26560 xc:white canvas.jpg
The text was updated successfully, but these errors were encountered:
This happens in the latest public release of this crate on this date, i.e. 0.25
Expected
Should be able to decode the image incase the
Limit
is turned off (usingreader.no_limits()
) or set to > 16384 (customLimit
withmax_image_width
andmax_image_height
set to the desired amount, 26560 in my case)Actual behaviour
Fails with error message from
zune_jpeg
crate:Error: Decoding(DecodingError { format: Exact(Jpeg), underlying: Some("Image width 26560 greater than width limit 16384. If use `set_limits` if you want to support huge images") })
Reproduction steps
Provide source code, a repository link, or steps
Generated
canvas.jpg
for testing usingImagemagick
with command below:convert -size 26560x26560 xc:white canvas.jpg
The text was updated successfully, but these errors were encountered: