I want to extract frames from an animated gif image, and save every frame into png format, but i found the png is not correct in some area except the first frame.
im = Image.open('earth.gif')
try:
while True:
new_frame = im.convert('RGBA')
new_frame.save('foo%02d.png' % im.tell(), 'PNG')
im.seek(im.tell()+1)
except EOFError:
pass
This is origin image
earth.gif

This is the second frame which i use my program got.

And the second frame shoud be(correct one):

the different area(red mark) between them:

other frames has the same problem, is it a bug in GifImagePlugin.py?
Tell me what i should do ?