Bump image to 0.23.12 (closes #422)
This commit is contained in:
parent
da137ca9b4
commit
f3faae383e
|
@ -26,7 +26,7 @@ serde = "1.0.117"
|
||||||
serde_json = "1.0.59"
|
serde_json = "1.0.59"
|
||||||
flate2 = { version = "1.0.19", features = ["rust_backend"], default-features = false }
|
flate2 = { version = "1.0.19", features = ["rust_backend"], default-features = false }
|
||||||
zip = { version = "0.5.6", features = ["deflate"], 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 = "0.7.3"
|
||||||
rand_pcg = "0.2.1"
|
rand_pcg = "0.2.1"
|
||||||
base64 = "0.13.0"
|
base64 = "0.13.0"
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ impl TextureManager {
|
||||||
};
|
};
|
||||||
let img = &dynamic_texture.1;
|
let img = &dynamic_texture.1;
|
||||||
let (width, height) = img.dimensions();
|
let (width, height) = img.dimensions();
|
||||||
(width, height, img.to_rgba().into_vec())
|
(width, height, img.to_rgba8().into_vec())
|
||||||
};
|
};
|
||||||
let new_tex =
|
let new_tex =
|
||||||
self.put_texture("steven-dynamic", n, width as u32, height as u32, data);
|
self.put_texture("steven-dynamic", n, width as u32, height as u32, data);
|
||||||
|
@ -1213,7 +1213,7 @@ impl TextureManager {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.pending_uploads
|
self.pending_uploads
|
||||||
.push((tex.atlas, rect, img.to_rgba().into_vec()));
|
.push((tex.atlas, rect, img.to_rgba8().into_vec()));
|
||||||
self.dynamic_textures
|
self.dynamic_textures
|
||||||
.get_mut(&format!("skin-{}", hash))
|
.get_mut(&format!("skin-{}", hash))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
@ -1243,7 +1243,7 @@ impl TextureManager {
|
||||||
let (width, height) = img.dimensions();
|
let (width, height) = img.dimensions();
|
||||||
// Might be animated
|
// Might be animated
|
||||||
if (name.starts_with("blocks/") || name.starts_with("items/")) && width != height {
|
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();
|
let frame = id[..(width * width * 4) as usize].to_owned();
|
||||||
if let Some(mut ani) = self.load_animation(plugin, name, &img, id) {
|
if let Some(mut ani) = self.load_animation(plugin, name, &img, id) {
|
||||||
ani.texture = self.put_texture(plugin, name, width, width, frame);
|
ani.texture = self.put_texture(plugin, name, width, width, frame);
|
||||||
|
@ -1251,7 +1251,7 @@ impl TextureManager {
|
||||||
return;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1406,7 +1406,7 @@ impl TextureManager {
|
||||||
rect_pos = Some(i);
|
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 {
|
if let Some(rect_pos) = rect_pos {
|
||||||
let mut tex = self.free_dynamics.remove(rect_pos);
|
let mut tex = self.free_dynamics.remove(rect_pos);
|
||||||
|
|
Loading…
Reference in New Issue