Initial commit

This commit is contained in:
Niles Rogoff 2016-09-20 00:29:26 -04:00
commit 2b76bfdb6b
4 changed files with 21 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.png
*.yuv

13
convert.py Normal file
View File

@ -0,0 +1,13 @@
import glob
import PIL.Image
for f in glob.glob("*-a.png"):
old = PIL.Image.open(f)
new = PIL.Image.new("RGB", (500, 250), (0, 0, 0))
for x in range(old.width):
for y in range(old.height):
try:
new.putpixel((int(500/2) + x - int(old.width / 2), int(250/2) + y - int(old.height / 2)), old.getpixel((x, y)))
except:
pass
new.save(f.replace("-a.png", "-b.png"))
print(f)

6
test.py Normal file
View File

@ -0,0 +1,6 @@
import glob, subprocess
f = glob.glob("*.png")
f.sort()
for i in range(len(f)):
thisfile = f[i]
subprocess.call(["mv", thisfile, str(i).rjust(3, "0") + ".png"])

BIN
test.webm Normal file

Binary file not shown.