migrate from PIL to Pillow