Skip to content
Stream of Knowledge Cisco · BGP · Network Security · Automation
beginner

Python code for converting colored image to black and white

Python code for converting colored image to black and white

Libraries used: PIL for python
IDE Used: Spyder
Tutorial video link: Click Here

https://knowledgestreams.blogspot.com/

knowledge streams blog spot dot com free knowledge blog. download free source codes for python and java and other free stuff.


from PIL import Image
open_image = Image.open("adress of the pictures")
open_image.show()
convert_to_blackandwhite= open_image.convert("L")
convert_to_blackandwhite.show()






knowledge streams blog spot dot com free knowledge blog. download free source codes for python and java and other free stuff.


Q: How to Install PIL??

A1: pip install PIL
A2: pip install pillow

#Python #beginner #source_code #image #convert

knowledge, Tutorials, information, programming, Cyber Security , CISCO, ,Excel, CCNA, CCNP, CCIE, Networking, LAB, Learning