diff options
author | jaseg <jaseg@jaseg.net> | 2014-01-03 00:10:20 +0100 |
---|---|---|
committer | jaseg <jaseg@jaseg.net> | 2014-01-03 00:10:20 +0100 |
commit | 916aced1bef07001ef4eee2a1cde6cd6e33b4bc3 (patch) | |
tree | a8af06f0dcc65645801a2e20db64ca877b288f98 /host/matelight/nyancat-test.py | |
parent | 34def4f660108632a9526c9ad3195fdb883d206d (diff) | |
download | matelight-916aced1bef07001ef4eee2a1cde6cd6e33b4bc3.tar.gz matelight-916aced1bef07001ef4eee2a1cde6cd6e33b4bc3.tar.bz2 matelight-916aced1bef07001ef4eee2a1cde6cd6e33b4bc3.zip |
Now with even more abstract art.
Diffstat (limited to 'host/matelight/nyancat-test.py')
-rwxr-xr-x | host/matelight/nyancat-test.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/host/matelight/nyancat-test.py b/host/matelight/nyancat-test.py deleted file mode 100755 index 73fd28e..0000000 --- a/host/matelight/nyancat-test.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python3 -import host -import numpy as np -from config import * -from PIL import Image, ImageSequence -import time - -img1 = Image.open(open('../nyancat.png', 'rb')) -img2 = Image.open(open('../nyancat2.png', 'rb')) -scroller = Image.open(open('../scroller.png', 'rb')) -datas = [] -for img in [img1, img2]: - im = img.convert("RGB") - im.thumbnail((DISPLAY_WIDTH, DISPLAY_HEIGHT), Image.NEAREST) - data = np.array(im.getdata(), dtype=np.uint8) - datas += [data.reshape((DISPLAY_HEIGHT, DISPLAY_WIDTH, 3))] - -im = scroller.convert("RGB") -bar = np.array(im.getdata(), dtype=np.uint8) -foo = bar.reshape((DISPLAY_HEIGHT, 300, 3)) - -while True: - for i in range(60): - for data in datas: - host.sendframe(data) - time.sleep(0.1) - for i in range(260): - host.sendframe(foo[:, i:i+40, :]) - |