Update resizer.py

make it work with Pillow