#!/usr/bin/env python3
# Pre-release iPhone OS 1 iBoots used some weird formats for storing graphics,
# this script is meant to decode Apple logo found on prototype iPod touch 1
# that ran iBoot-115.6 which is a good ole SwitchBoard gear, but with blood
#
# This particular example is more or less just RGBA, but long sequences
# of same color are TLV encoded
#
# The format was likely just meant to be temporary, and provides almost no metadata,
# even width & height are hardcoded into the iBoot itself
import sys
import struct
from PIL import Image
WIDTH = 71
HEIGHT = 84
def main():
try:
_, file, out = sys.argv
except ValueError:
print("usage: %s