-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Gif is decoded as 1 frame animation #801
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
Comments
Frames of that GIF are located outside the canvas.
The entire canvas has size 3999x3999 px, but eg. image #1 having size 3393x3999 starts at offset 993,2014 so it requires canvas which has at least 4386x6013 px. Some GIF viewers try to "fix" such issues either by extending the canvas or cropping parts which exceed the bounds. Regarding decoding as 1 frame. In this library (and probably in most viewers) there is a rule that the content successfully decoded (what exactly can be successful depends among the others on workarounds for broken images) so far is kept and after error is encountered then new frames are not decoded. As you can see on the gifsicle output image #0 is correct and the next one is too large, so there is only 1 valid image. Regarding error reported. In this case it should be |
Oh, I see 🤔 So, I believe in a future you will manage to find a great and easy approach/way to "support" such frameSize-broken GIFs. Anyway, thanks a lot for your help, explanation and really quick answer 👍👍👍 |
* Dependency versions bump * Stop further decoding on error. Fixes incorrect error code in #801 * Sample dependency versions bump * Stronger suppress warning for workaround in LibraryLoader * Fix java to kotlin conversion of TexturePlaceholderFragment.kt * Clear GifTextureView when removing source. Fixes #745 * Fix current position calculation on the subsequent loops on first frame. Fixes #657 * Update NDK to 25.0.8775105 * Release 1.2.25
Hello 😇
I've found an issue on my working project. I have faced with a problem when some of our GIF display incorrectly.
I've investigated and found out that:
(But as I see, you are already know it and even managed to fix 👍 Waiting for the release)
Let's talk about second one.
Our
GifDrawable
creating has next steps:As the result
GifDrawable
is:GIF: size: 1999x1999, frames: 1, error: 107
Here we can see 107 error and only 1 fetched frame (but actually it has more frames 😞)
About GIF. Nothing special here except of "why is it so big??? 🙃".
Yes, it is really big. And, btw,
gifInSampleSize = 4
here 🤫It was found during the testing of different sizes.
How was this GIF born:
I request you help in case of at least explanation "why it was decoded as 1 frame". I don't know, probably, online converter made it's own dirty monkey tricks and GIF file become broken. So, I would appreciate any of your help and explanation here.
P.S. I have tested this gif with your sample project and added this 'broken' GIF to
drawable
resources. Result is the same. You can reproduce it by yourself, I'll attach it.P.P.S. GIF playing is okey for my PC (more than 1 frame animation)
broken_cat.zip
The text was updated successfully, but these errors were encountered: