#!/usr/bin/env python3 import sys import argparse import struct args = argparse.ArgumentParser(description='32x32 BMP to assembly icon (non-B&W becomes transparent)') args.add_argument('bmp', help='BMP file') args = args.parse_args() bmp = open(args.bmp, 'rb').read() sig, fsize, pixoffset, w, h = struct.unpack_from('