update imaging to pillow