How To Generate An Image In Python