fix deprecation error in image_texture_loader (and CI error) (#906)

fix deprecation error in image_texture_loader (and CI error)
This commit is contained in:
bg 2020-11-21 12:26:35 -08:00 committed by GitHub
parent d11be437cb
commit 106486bd99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -108,10 +108,10 @@ jobs:
override: true
- name: Install alsa
run: sudo apt-get install --no-install-recommends libasound2-dev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev
- name: Install udev
run: sudo apt-get install --no-install-recommends libudev-dev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libudev-dev
- name: Check the format
run: cargo +nightly fmt --all -- --check

View file

@ -65,7 +65,7 @@ impl AssetLoader for ImageTextureLoader {
data = i.into_raw();
}
image::DynamicImage::ImageRgb8(i) => {
let i = image::DynamicImage::ImageRgb8(i).into_rgba();
let i = image::DynamicImage::ImageRgb8(i).into_rgba8();
width = i.width();
height = i.height();
format = TextureFormat::Rgba8UnormSrgb;
@ -80,7 +80,7 @@ impl AssetLoader for ImageTextureLoader {
data = i.into_raw();
}
image::DynamicImage::ImageBgr8(i) => {
let i = image::DynamicImage::ImageBgr8(i).into_bgra();
let i = image::DynamicImage::ImageBgr8(i).into_bgra8();
width = i.width();
height = i.height();