Fix breaking image 0.25.2 release. (#14421)

Deprecated item breaking ci:
https://github.com/image-rs/image/releases/tag/v0.25.2. See
https://github.com/bevyengine/bevy/actions/runs/10030764981/job/27720434072?pr=14419
for example.
This commit is contained in:
charlotte 2024-07-21 14:27:07 -07:00 committed by François
parent 680c994100
commit 27cafdae9b
No known key found for this signature in database

View file

@ -744,7 +744,7 @@ impl Image {
let image_crate_format = format
.as_image_crate_format()
.ok_or_else(|| TextureError::UnsupportedTextureFormat(format!("{format:?}")))?;
let mut reader = image::io::Reader::new(std::io::Cursor::new(buffer));
let mut reader = image::ImageReader::new(std::io::Cursor::new(buffer));
reader.set_format(image_crate_format);
reader.no_limits();
let dyn_img = reader.decode()?;