Home > Software engineering >  How can I get image from this python code?
How can I get image from this python code?

Time:12-02

from PIL import Image
new_im = Image.new('RGB', (100,200), (255,255,255))
new_im.save("MonImage.png", "PNG")

i use this code in visual studio to create an image but i cant show it

CodePudding user response:

In addition to saving the file to disk (via new_im.save) you can also display the image with

new_im.show()

CodePudding user response:

I think this will help you (your picture will be opened in a new window)

new_im.show()

  • Related