You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GIFs we create are really big. Like easily 10s of MBs.
I think that's because every frame is stored in full. You can compress GIFs by storing each frame as a delta, so only parts of the image that have changed are re-drawn.
Just came across https://github.com/ImageOptim/gifski, which might be an easier option to integrate with. Could probably build it into a wheel relatively easily with maturin.
The GIFs we create are really big. Like easily 10s of MBs.
I think that's because every frame is stored in full. You can compress GIFs by storing each frame as a delta, so only parts of the image that have changed are re-drawn.
See https://stackoverflow.com/q/42698983/17100540 (no answers). The last answer to this question https://stackoverflow.com/q/24688802/17100540 references a
gifmaker.makedelta
function, which doesn't seem to exist anymore, but maybe I found a version of in https://github.com/wnyc/PIL/blob/90b8b064178c9c0bd37d348ff2a45fd380e7149e/Scripts/gifmaker.py?Could possibly be interesting to look at what gifsicle does: https://github.com/kohler/gifsicle/blob/master/src/optimize.c. I imagine something simpler would be possible to do pretty easily with NumPy/PIL.
The text was updated successfully, but these errors were encountered: