voodoo/gen/rgb_txt.py

10 lines
184 B
Python

import struct
import sys
with open(sys.argv[1], 'rb') as f:
buf = f.read()
for i in range(len(buf) // 2):
value, = struct.unpack('<H', buf[i*2:i*2+2])
print(f"{value},")