Png gif animation #241

Merged
merged 2 commits into from Sep 1, 2011

Conversation

Projects
None yet
2 participants
Owner

akshayaurora commented Aug 28, 2011

Fix: Allow zip files to load from cache, were being re-loaded and saved in a new cache every-time
Fix: Make sure exception is raised when zip archive has no images.

@tito tito commented on the diff Aug 31, 2011

kivy/core/image/__init__.py
@@ -503,10 +500,11 @@ class Image(EventDispatcher):
return
# if image not already in cache then load
+ tmpfilename = self._filename
@tito

tito Aug 31, 2011

Owner

I don't understand that bug. Can you explain please ?

@akshayaurora

akshayaurora Aug 31, 2011

Owner

This bug occurs when loading a zip file for second or more times. Cause the ImageLoader is passed a SIO object as filename the filename used in UID for cache storage is the object ref number( which is different every time) and not the filename, thus when attempting to read the contents from cache using filename it fails and the contents are stored in cache again.

The above fix changes the filename back to it's original value after the images are read and before the data is stored in cache .

@tito tito added a commit that referenced this pull request Sep 1, 2011

@tito tito Merge pull request #241 from akshayaurora/png_gif_animation
Png gif animation
f60f5f1

@tito tito merged commit f60f5f1 into kivy:master Sep 1, 2011

@gfyoung gfyoung pushed a commit to gfyoung/kivy that referenced this pull request Mar 22, 2017

@femtotrader femtotrader DOC: Update WB link (#241)
Closes #240
011448b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment