Add variable frame delay for GIF animated images
Thanks for opening your first pull request here! 💖 Please check out our contributing guidelines.
Ok, makes sense. Long term though, wouldn't you say that by default we should be using animation delays provided by the gif loader? Isn't that something you'd almost always want?
If so, maybe we should break backward compat (this is 2.0.0 after all) and have it default to True? Alternatively, we should make it clear in the docs that maybe in a couple of releases we'll change it to default to True?
Ok, makes sense. Long term though, wouldn't you say that by default we should be using animation delays provided by the gif loader? Isn't that something you'd almost always want?
If so, maybe we should break backward compat (this is 2.0.0 after all) and have it default to True? Alternatively, we should make it clear in the docs that maybe in a couple of releases we'll change it to default to True?
@matham @tshirtman
I agree, but I don’t know how things like this are being solved, maybe you will somehow agree among themselves, core developers? Default sets here
kivy/uix/image.py:202
auto_anim_delay = BooleanProperty(False)
p.s. I don't like this float comparison
kivy/core/image/init.py:711
if all(elem == x[0] for elem in x)
Maybe I should replace this with this?
if all("%.3f" % elem == "%.3f" % x[0] for elem in x)
@matham could you see my updated code
@matham Could you please review my code again?
- I deleted this check because taking these durations from GIF file and then everything goes as if you explicitly set the durations.
- Now if we specify the duration explicitly, we consider the automatic setting to be false
There is little merge conflict. Should I resolve it in my branch locally and push or is it better not to touch?
@matham Could you please see my code again? I changed the use of parameters and described them in code doc-strings. Fix code for using with AsyncImage and zipsequence. Thank you for your patience with parsing my fixes.
@matham Сould you take a look at my code again?
@pythonic64 Thanks, I fixed.
I'd feel much more comfortable if there were tests testing these new options/properties. Because I'm not sure it's working correctly. I see I have some requested changes that I started working on back then but didn't complete, so I'll post it now, but since I didn't spend time on it since, you can just think of it as potential concerns rather than for sure issues.
There were a lot more concerns I had, but came to conclusion it's better if I just try to resolve it myself because it's hard to do it through review, but unfortunately had no time since.