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
Generated
+1
View File
@@ -1419,6 +1419,7 @@ dependencies = [
"filmcraft-frame",
"filmcraft-media",
"filmcraft-time",
"gif",
"image",
"log",
"rayon",