PHP Port of Pebble Toolkit's  bitmapgen.py for converting images to PBI