Open GQY2012 opened 5 years ago
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
I'm not entirely sure what you're reporting, do you have a sample GIF you could attach?
I'm not entirely sure what you're reporting, do you have a sample GIF you could attach?
Thanks for your reply. This broken gif has a total of two frames and can be displayed normally in Windows(It means that the first frame can be used as a thumbnail and can generate animations). I tried to get the thumbnail and animation with getNextFrame(), but I always only get the second frame. I found that neither frame of this gif has Graphics Control Extension, which will result in two consecutive entries into the same case IMAGE_SEPARATOR.Then the readBitmap() will make the next frame cover all previous frames.
Thanks. Out of curiosity are you aware of any GIFs that have this behavior that are not broken in Chrome?
Thanks. Out of curiosity are you aware of any GIFs that have this behavior that are not broken in Chrome?
1.In fact, I use this decoder in android. 2.Whether this picture is broken or not is not important.In theory,any gif with consecutive frames without Graphic Control Extension will have this situation. 3.The following gif also has two frames without Graphic Control Extension,and you can try it.
By the way, I read the issue #134 mentioned in the comment. Coincidentally, that bug is also handled by you. I think it only handles the case where there is no Graphic Control Extension in the first frame.
https://github.com/bumptech/glide/blob/c03564af9bf54d401cf132c0a6157dbee1383b4d/third_party/gif_decoder/src/main/java/com/bumptech/glide/gifdecoder/GifHeaderParser.java#L205-L214