Import PIL instead of just the Image class since it doesn't resolve on all platforms.