Enforce valid image brightness in daemon and asusctl

This commit is contained in:
I Al Istannen
2022-07-16 03:00:22 +00:00
committed by Luke Jones
parent ef04549c8e
commit c0e36295b7
6 changed files with 50 additions and 12 deletions

View File

@@ -191,7 +191,7 @@ impl AnimeGif {
pixels,
decoder.width() as u32,
anime_type,
);
)?;
while let Some(frame) = decoder.read_next_frame()? {
let wait = frame.delay * 10;
@@ -206,7 +206,7 @@ impl AnimeGif {
pixels,
width as u32,
anime_type,
);
)?;
}
for (y, row) in frame.buffer.chunks(frame.width as usize * 4).enumerate() {
for (x, px) in row.chunks(4).enumerate() {