using pillow instead pil.