how to create images in python