mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
anime: gif-image
This commit is contained in:
@@ -39,7 +39,7 @@ pub enum AniMeSequence {
|
||||
|
||||
impl AniMeSequence {
|
||||
pub fn gif(file: &Path, brightness: f32) -> Result<Self, AnimeError> {
|
||||
let frames = AniMeGif::new(file, brightness)?;
|
||||
let frames = AniMeGif::create_diagonal_gif(file, brightness)?;
|
||||
Ok(Self::Animation(frames))
|
||||
}
|
||||
|
||||
@@ -55,6 +55,15 @@ impl AniMeSequence {
|
||||
Ok(Self::Image(Box::new(data)))
|
||||
}
|
||||
|
||||
pub fn png_gif(file: &Path,
|
||||
// scale: Vec2,
|
||||
// angle: f32,
|
||||
// translation: Vec2,
|
||||
brightness: f32,) -> Result<Self, AnimeError> {
|
||||
let frames = AniMeGif::create_png_gif(file, brightness)?;
|
||||
Ok(Self::Animation(frames))
|
||||
}
|
||||
|
||||
pub fn get_animation(&self) -> Option<&AniMeGif> {
|
||||
match self {
|
||||
AniMeSequence::Animation(anim) => Some(anim),
|
||||
|
||||
Reference in New Issue
Block a user