File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ """
2
+ Example to extract the frames and other parameters from an animated gif
3
+ and then run the animation on the display.
4
+
5
+ Usage:
6
+ python3 is31fl3731_pillow_animated_gif.py animated.gif
7
+
8
+ This example is for use on (Linux) computers that are using CPython with
9
+ Adafruit Blinka to support CircuitPython libraries. CircuitPython does
10
+ not support PIL/pillow (python imaging library)!
11
+
12
+ Author(s): Melissa LeBlanc-Williams for Adafruit Industries
13
+ """
14
+
1
15
import sys
2
16
import board
3
17
from PIL import Image
12
26
display .fill (0 )
13
27
14
28
# Open the gif
29
+ if len (sys .argv ) < 2 :
30
+ print ("No image file specified" )
31
+ print ("Usage: python3 is31fl3731_pillow_animated_gif.py animated.gif" )
32
+ sys .exit ()
33
+
15
34
image = Image .open (sys .argv [1 ])
16
35
17
36
# Make sure it's animated
Original file line number Diff line number Diff line change 2
2
Example to utilize the Python Imaging Library (Pillow) and draw bitmapped text
3
3
to 8 frames and then run autoplay on those frames.
4
4
5
+ This example is for use on (Linux) computers that are using CPython with
6
+ Adafruit Blinka to support CircuitPython libraries. CircuitPython does
7
+ not support PIL/pillow (python imaging library)!
8
+
5
9
Author(s): Melissa LeBlanc-Williams for Adafruit Industries
6
10
"""
7
11
You can’t perform that action at this time.
0 commit comments