Skip to content

Instantly share code, notes, and snippets.

View Kelbie's full-sized avatar

Kelbie Kelbie

View GitHub Profile
@Kelbie
Kelbie / blocktoimg.py
Created July 29, 2018 03:25 — forked from laanwj/blocktoimg.py
simple tools to write (block) data to png files
#!/usr/bin/env python3
# Distributed under the MIT software license
import binascii, struct, sys
from PIL import Image
def div_roundup(x,y):
return (x+y-1)//y
f = open(sys.argv[1], 'r')
outfilename = sys.argv[2]