Fix deprecation warnings from image
This commit is contained in:
parent
1af6fb3ec0
commit
209056e1cd
1 changed files with 2 additions and 2 deletions
|
|
@ -43,14 +43,14 @@ impl Cache {
|
||||||
let memory = match handle.data() {
|
let memory = match handle.data() {
|
||||||
image::Data::Path(path) => {
|
image::Data::Path(path) => {
|
||||||
if let Ok(image) = ::image::open(path) {
|
if let Ok(image) = ::image::open(path) {
|
||||||
Memory::Host(image.to_bgra())
|
Memory::Host(image.to_bgra8())
|
||||||
} else {
|
} else {
|
||||||
Memory::NotFound
|
Memory::NotFound
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
image::Data::Bytes(bytes) => {
|
image::Data::Bytes(bytes) => {
|
||||||
if let Ok(image) = ::image::load_from_memory(&bytes) {
|
if let Ok(image) = ::image::load_from_memory(&bytes) {
|
||||||
Memory::Host(image.to_bgra())
|
Memory::Host(image.to_bgra8())
|
||||||
} else {
|
} else {
|
||||||
Memory::Invalid
|
Memory::Invalid
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue