Import animated GIFs as movies

GIFs went through the still-image path, so an animated GIF came in as a
single frame with zero duration. A GIF with two or more frames is now
probed as a movie: its frame rate is chosen so every per-frame delay is
a whole number of frames (uneven timing is kept exactly), delays of 0
or 1 hundredths count as 10 like in browsers, and the pool decodes the
frame shown at the requested time. A single-frame GIF stays a still.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Limestudio90
2026-10-10 11:38:00 +02:00
co-authored by Claude Sonnet 5.5
parent 813c7c4650
commit bfbdadd34a
6 changed files with 243 additions and 0 deletions
+1
View File
@@ -17,6 +17,7 @@
mod convert;
pub mod exr_channels;
mod gif_anim;
mod layered;
pub use layered::vector_doc;
mod pool;