-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
Description
We noticed that scaled animated GIFs can be larger (sometimes much larger) than the original file size.
This seems to be because the default LANCZOS resampling and conversion to a palette-based image gets in the way of optimizing the file when saving, because parts of the image that remained the same between frames are now recognized as different.
I've tested and found that using NEAREST resampling and processing all the frames of the animation as RGBA helps. The resulting image quality is not quite as good (no antialiasing) but the file size is much better. This seems like a reasonable tradeoff. I'll make a PR.
(Note: I could not find any way with Pillow to get as good results as with a dedicated tool like gifsicle.)
Reactions are currently unavailable