Image packing module for python