Pillow based script to change image size