mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
Don't use nightly only function
This commit is contained in:
parent
293bb15c7b
commit
bace62b8e3
|
@ -12,10 +12,7 @@ pub(crate) struct Image {
|
||||||
|
|
||||||
impl Image {
|
impl Image {
|
||||||
pub fn load_from_file(image_path: &path::Path) -> Self {
|
pub fn load_from_file(image_path: &path::Path) -> Self {
|
||||||
let img = if image_path
|
let img = if image_path.extension() == Some(OsStr::new("aseprite")) {
|
||||||
.extension()
|
|
||||||
.is_some_and(|extension| extension == OsStr::new("aseprite"))
|
|
||||||
{
|
|
||||||
let ase =
|
let ase =
|
||||||
asefile::AsepriteFile::read_file(image_path).expect("failed to read aseprite file");
|
asefile::AsepriteFile::read_file(image_path).expect("failed to read aseprite file");
|
||||||
DynamicImage::ImageRgba8(ase.frame(0).image())
|
DynamicImage::ImageRgba8(ase.frame(0).image())
|
||||||
|
|
Loading…
Reference in a new issue