Bump image to 0.23.12 (closes #422)

This commit is contained in:
ice_iix 2020-11-24 12:12:56 -08:00
parent da137ca9b4
commit f3faae383e
2 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ serde = "1.0.117"
serde_json = "1.0.59"
flate2 = { version = "1.0.19", features = ["rust_backend"], default-features = false }
zip = { version = "0.5.6", features = ["deflate"], default-features = false }
image = "0.23.10"
image = "0.23.12"
rand = "0.7.3"
rand_pcg = "0.2.1"
base64 = "0.13.0"

View File

@ -1152,7 +1152,7 @@ impl TextureManager {
};
let img = &dynamic_texture.1;
let (width, height) = img.dimensions();
(width, height, img.to_rgba().into_vec())
(width, height, img.to_rgba8().into_vec())
};
let new_tex =
self.put_texture("steven-dynamic", n, width as u32, height as u32, data);
@ -1213,7 +1213,7 @@ impl TextureManager {
};
self.pending_uploads
.push((tex.atlas, rect, img.to_rgba().into_vec()));
.push((tex.atlas, rect, img.to_rgba8().into_vec()));
self.dynamic_textures
.get_mut(&format!("skin-{}", hash))
.unwrap()
@ -1243,7 +1243,7 @@ impl TextureManager {
let (width, height) = img.dimensions();
// Might be animated
if (name.starts_with("blocks/") || name.starts_with("items/")) && width != height {
let id = img.to_rgba().into_vec();
let id = img.to_rgba8().into_vec();
let frame = id[..(width * width * 4) as usize].to_owned();
if let Some(mut ani) = self.load_animation(plugin, name, &img, id) {
ani.texture = self.put_texture(plugin, name, width, width, frame);
@ -1251,7 +1251,7 @@ impl TextureManager {
return;
}
}
self.put_texture(plugin, name, width, height, img.to_rgba().into_vec());
self.put_texture(plugin, name, width, height, img.to_rgba8().into_vec());
return;
}
}
@ -1406,7 +1406,7 @@ impl TextureManager {
rect_pos = Some(i);
}
}
let data = img.to_rgba().into_vec();
let data = img.to_rgba8().into_vec();
if let Some(rect_pos) = rect_pos {
let mut tex = self.free_dynamics.remove(rect_pos);