How do you scale an animated GIF image in PIL and preserve the animation
问题 I'm wondering if it's possible to scale an animated GIF image using PIL. In particular Plone’s archetypes ImageField currently loses the animation from images scaled using its scale method: def scale(self, data, w, h, default_format = 'PNG'): """ scale image (with material from ImageTag_Hotfix)""" #make sure we have valid int's size = int(w), int(h) original_file=StringIO(data) image = PIL.Image.open(original_file) # consider image mode when scaling # source images can be mode '1','L,','P',