-
Notifications
You must be signed in to change notification settings - Fork 28.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebP image animation does not respect loop count #162956
Comments
@dicenull Can you share the original asset/source that you are using in the demo?
I am trying to understand where this number came from, is that the asset you uploaded to github comments? |
Yes, share the asset link, GitHub comments did not support the webp format. This WebP file has 20 frames. |
I am seeing inconsistent output across platforms
Can you please zip and share the asset? flutter doctor -v
|
Here is the zipped file. Only Flutter Web 3.27.x seemed to cause this issue. Not seen on Android or iOS. |
Reproducible on latest stable and the master channel. Flutter does not respect web image loop count In the below details look for webp image infomahesh@MacBook-Pro-9 hello-world % webpinfo ~/Downloads/hello_loop_2\ 2.webp
File: /Users/mahesh/Downloads/hello_loop_2 2.webp
RIFF HEADER:
File size: 18008
Chunk VP8X at offset 12, length 18
ICCP: 0
Alpha: 1
EXIF: 0
XMP: 0
Animation: 1
Canvas size 640 x 88
Chunk ANIM at offset 30, length 14
Background color:(ARGB) ff 00 00 00
Loop count : 2
Chunk ANMF at offset 44, length 750
Offset_X: 0
Offset_Y: 0
Width: 640
Height: 88
Duration: 100
Dispose: 0
Blend: 1
Chunk VP8L at offset 68, length 726
Width: 640
Height: 88
Alpha: 0
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 794, length 1200
Offset_X: 0
Offset_Y: 0
Width: 640
Height: 88
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 818, length 1176
Width: 640
Height: 88
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 1994, length 760
Offset_X: 44
Offset_Y: 22
Width: 596
Height: 57
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 2018, length 736
Width: 596
Height: 57
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 2754, length 1224
Offset_X: 0
Offset_Y: 16
Width: 640
Height: 61
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 2778, length 1200
Width: 640
Height: 61
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 3978, length 968
Offset_X: 0
Offset_Y: 0
Width: 640
Height: 87
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 4002, length 944
Width: 640
Height: 87
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 4946, length 302
Offset_X: 80
Offset_Y: 16
Width: 79
Height: 48
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 4970, length 278
Width: 79
Height: 48
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 5248, length 654
Offset_X: 0
Offset_Y: 0
Width: 104
Height: 68
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 5272, length 630
Width: 104
Height: 68
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 5902, length 680
Offset_X: 0
Offset_Y: 0
Width: 640
Height: 68
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 5926, length 656
Width: 640
Height: 68
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 6582, length 1082
Offset_X: 0
Offset_Y: 0
Width: 128
Height: 68
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 6606, length 1058
Width: 128
Height: 68
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 7664, length 1184
Offset_X: 0
Offset_Y: 0
Width: 639
Height: 64
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 7688, length 1160
Width: 639
Height: 64
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 8848, length 1966
Offset_X: 0
Offset_Y: 0
Width: 640
Height: 88
Duration: 100
Dispose: 0
Blend: 1
Chunk VP8L at offset 8872, length 1942
Width: 640
Height: 88
Alpha: 0
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 10814, length 952
Offset_X: 60
Offset_Y: 12
Width: 104
Height: 52
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 10838, length 928
Width: 104
Height: 52
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 11766, length 1530
Offset_X: 0
Offset_Y: 0
Width: 640
Height: 64
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 11790, length 1506
Width: 640
Height: 64
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 13296, length 1388
Offset_X: 0
Offset_Y: 0
Width: 636
Height: 64
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 13320, length 1364
Width: 636
Height: 64
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 14684, length 326
Offset_X: 60
Offset_Y: 14
Width: 118
Height: 50
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 14708, length 302
Width: 118
Height: 50
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 15010, length 432
Offset_X: 60
Offset_Y: 12
Width: 126
Height: 52
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 15034, length 408
Width: 126
Height: 52
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 15442, length 418
Offset_X: 160
Offset_Y: 16
Width: 479
Height: 48
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 15466, length 394
Width: 479
Height: 48
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 15860, length 74
Offset_X: 60
Offset_Y: 12
Width: 2
Height: 3
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 15884, length 50
Width: 2
Height: 3
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 15934, length 720
Offset_X: 0
Offset_Y: 0
Width: 640
Height: 64
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 15958, length 696
Width: 640
Height: 64
Alpha: 1
Animation: 0
Format: Lossless (2)
Chunk ANMF at offset 16654, length 1354
Offset_X: 0
Offset_Y: 0
Width: 640
Height: 76
Duration: 100
Dispose: 0
Blend: 0
Chunk VP8L at offset 16678, length 1330
Width: 640
Height: 76
Alpha: 1
Animation: 0
Format: Lossless (2)
No error detected. flutter doctor -v
|
Steps to reproduce
Expected results
Looping at the number of times specified in the WebP animation.
In the case of two loops, it is expected to stop after two loops.
In the case of infinity, it is expected to continue indefinitely.
Actual results
The loop stops after the number of WebP animation frames + 1.
This occurred independent of the number of loops in the WebP animation.
Code sample
https://dartpad.dev/87983e8bdcec7eba69940baf0d02a59e
Code sample
Screenshots or Video
Screenshots / Video demonstration
flutter_web_webp_issue_demo.mov
Logs
No response
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: