Changed import to support pillow instead of PIL.