Skip to content

Instantly share code, notes, and snippets.

View plallin's full-sized avatar
😼
I like cats

Pauline plallin

😼
I like cats
View GitHub Profile
@plallin
plallin / resize_gif.py
Last active June 17, 2019 14:25 — forked from BigglesZX/gifextract.py
Extract frames from an animated GIF, correctly handling palettes and frame update modes
from PIL import Image
'''
Based on a script by BigglesZX: https://gist.github.com/BigglesZX/4016539
BigglesZX was adapted as follows:
- Updated to be compatible with Python 3.
- The original function 'processImage' was renamed 'extract_and_resize_frames' and was adapted as follows:
- It resizes each frames as it extracts them
- It saves all the frames to an array