Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert an image in python [closed]

how do you import or insert an image using python.Basically I want to know how to import an image and how to select the file and folder its in using python.

like image 595
Daniel Turner Avatar asked May 14 '26 18:05

Daniel Turner


1 Answers

Install PIL(Python Image Library) :

then:

from PIL import Image
myImage = Image.open("your_image_here");
myImage.show();
like image 180
Sameer H. Ibra Avatar answered May 16 '26 08:05

Sameer H. Ibra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!