Import Image, etc. from PIL instead of directly.