UprootLabs / poly-flif

:camera: A poly-fill for the FLIF image format.
https://uprootlabs.github.io/poly-flif/
Other
244 stars 11 forks source link

Animated FLIF frame delays are not respected #51

Closed ghost closed 5 years ago

ghost commented 5 years ago

I encoded a GIF file (attached) with gif2flif (from FLIF's repo). The resulting FLIF (attached as .flif.gz) had the correct frame delays of 80 milliseconds. I then loaded the animated FLIF in poly-flif with an HTML file:

<script src="flif.js"></script>
<canvas data-polyflif-src="skunk.flif"></canvas>

The resulting page is the attached MP4 file (gzipped). The displayed image had delays which were much shorter than the input FLIF file.

Deconstructing the FLIF with flif skunk.flif skunk.png reported correct timings. Reconstructing the GIF with convert -loop 0 -delay 8 skunk*.png skunk-reconstructed.gif created a correctly timed image.

skunk

skunk.flif.gz

skunk.mp4.gz

hrj commented 5 years ago

@alexandercrypto Yeah, the support for animations is not complete. An issue exists for this already: #2, so let's use that.