Created
October 18, 2015 20:03
-
-
Save ubuntor/9a53ecf0d034b0e6c54e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
from math import sin, cos, pi | |
r1 = 72 | |
r2 = 97 | |
flag = '' | |
for j in range(2,1681,4): | |
im = Image.open('convert_output_{:05d}.png'.format(j)) | |
final = 0 | |
maxi = 0 | |
maxs = 0 | |
for i in range(16): | |
x, y = 300+r1*sin(pi+i*pi/16), 300+r1*cos(pi+i*pi/16) | |
x, y = round(x), round(y) | |
s = 0 | |
for k in [-1,0,1]: | |
for l in [-1,0,1]: | |
p = im.getpixel((x+k,y+l)) | |
if type(p) == tuple: | |
p = sum(p) | |
s += p | |
if s > maxs: | |
maxs = s | |
maxi = i | |
final += 16*maxi | |
maxi = 0 | |
maxs = 0 | |
for i in range(16): | |
x, y = 300+r2*sin(pi+i*pi/16), 300+r2*cos(pi+i*pi/16) | |
x, y = round(x), round(y) | |
s = 0 | |
for k in [-1,0,1]: | |
for l in [-1,0,1]: | |
p = im.getpixel((x+k,y+l)) | |
if type(p) == tuple: | |
p = sum(p) | |
s += p | |
if s > maxs: | |
maxs = s | |
maxi = i | |
final += maxi | |
flag += chr(final) | |
print(flag) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ffmpeg -i waterleaf*.avi -an -f image2 "output_%05d.jpg" | |
for f in output_*.png; do | |
convert $f -crop 600x600+0+0 -fft +delete -auto-level -evaluate log 100 convert_$f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment