Skip to content

Commit 41d8dfb

Browse files
committed
Added CPython only warning; checking if fmage supplied
1 parent 064edcf commit 41d8dfb

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

examples/is31fl3731_pillow_animated_gif.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
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+
115
import sys
216
import board
317
from PIL import Image
@@ -12,6 +26,11 @@
1226
display.fill(0)
1327

1428
# 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+
1534
image = Image.open(sys.argv[1])
1635

1736
# Make sure it's animated

examples/is31fl3731_pillow_numbers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Example to utilize the Python Imaging Library (Pillow) and draw bitmapped text
33
to 8 frames and then run autoplay on those frames.
44
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+
59
Author(s): Melissa LeBlanc-Williams for Adafruit Industries
610
"""
711

0 commit comments

Comments
 (0)