Complete anime diagonal gif support for GA402

This commit is contained in:
I-Al-Istannen
2022-07-10 13:23:21 +02:00
committed by Luke D. Jones
parent f3f6fadfe2
commit a2c8a226a4
10 changed files with 69 additions and 81 deletions

View File

@@ -90,12 +90,11 @@ impl AnimeGif {
#[inline]
pub fn from_diagonal_gif(
file_name: &Path,
duration: AnimTime,
brightness: f32,
anime_type: AnimeType,
) -> Result<Self, AnimeError> {
let mut matrix = AnimeDiagonal::new(None);
let mut matrix = AnimeDiagonal::new(anime_type, None);
let mut decoder = gif::DecodeOptions::new();
// Configure the decoder such that it will expand the image to RGBA.
@@ -138,7 +137,7 @@ impl AnimeGif {
duration: AnimTime,
brightness: f32,
) -> Result<Self, AnimeError> {
let image = AnimeDiagonal::from_png(file_name, None, brightness)?;
let image = AnimeDiagonal::from_png(file_name, None, brightness, anime_type)?;
let mut total = Duration::from_millis(1000);
if let AnimTime::Fade(fade) = duration {