Attempt at optimization

Trying to use PIL branch Pillow to optimize image production