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
#!/usr/bin/env python3 | |
# Distributed under the MIT software license | |
import binascii, struct, sys, io, argparse | |
from PIL import Image | |
IMG_WIDTH = 512 # could be made adaptive... | |
MIN_HEIGHT = 4 # minimum height of image; twitter won't let us upload anything smaller | |
BYTES_PER_PIXEL = 4 # RGBA, 8 bit | |
def div_roundup(x,y): |