From 67033f5c20c9c1c6653cdb3e66a74539d634ec64 Mon Sep 17 00:00:00 2001 From: pepperpepperpepper Date: Wed, 18 Nov 2015 10:08:55 -0800 Subject: cleanup continued --- share/frontend/impattern/newimagefromjson.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 share/frontend/impattern/newimagefromjson.py (limited to 'share/frontend/impattern/newimagefromjson.py') diff --git a/share/frontend/impattern/newimagefromjson.py b/share/frontend/impattern/newimagefromjson.py deleted file mode 100644 index 5f62bd1..0000000 --- a/share/frontend/impattern/newimagefromjson.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/python2.7 -import simplejson as json -from PIL import Image -import sys - -f = open("myjson.json", 'r'); -myjson = f.read(); -f.close(); - -specs = json.loads(myjson); -img = Image.new('RGBA', (int(specs['width']), int(specs['height']))); - -def boolToColor(boolean): - if boolean: - return (0,0,0,255); - else: - return (255,255,255,0) - -pixels = img.load(); -#for i in range(0, 9, 2): -# dosomething(i) -for i in range(0, len(specs['matrix'])): - for j in range(0, len(specs['matrix'][i])): - pixels[j,i] = boolToColor(int(specs['matrix'][i][j])); - -img.save("myimage.png", "PNG") -- cgit v1.2.3-70-g09d2