SHARE
TWEET

Untitled

a guest Jan 18th, 2015 603 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import struct
  2.  
  3. from PIL import Image
  4.  
  5. def main():
  6.     data = open("Fuzyll - The Alpha Molecule.wav", "rb").read()
  7.  
  8.     data = data[0x28:]
  9.  
  10.    
  11.     dist = 10000
  12.     for i in xrange(0, len(data)-4, dist):
  13.         im = Image.new("RGB", (1024, 1024))
  14.        
  15.         for j in xrange(i, i + dist, 4):
  16.             L, R = struct.unpack("<hh", data[i+j:i+j+4])
  17.             x = 512 + L * 500 / 65536
  18.             y = 512 + R * 500 / 65536
  19.            
  20.             im.putpixel((x,y), (255,255,255))
  21.            
  22.         im.save("test%08d.png" % i)
  23.        
  24.        
  25. main()
RAW Paste Data
Top