I've created a short animation using Python, Pillow (a fork of PIL), and cairo. The current animation is 334 frames. I can save a single frame using the following code...
frame_images[0].save('test_frame.gif')
and I will get a 34 kb file. I have been creating gifs using the save_all option in pillow...
frame_images[0].save('test.gif', save_all=True, append_images=frame_images[1:], loop=0)
And the result does not work as expected. The output is 22.8 MB, more than twice the size of a single frame times 334, and the quality is substantially degraded. There are artifacts all over the image, several frames have remnants from previous frames, and the color of the items often appear incorrectly.
Does anybody have any suggestions for fixing this issue? Should I just Pillow to save still frames and then a different library to create a gif?