color to BW convert using python
by specter - Friday June 16, 2023 at 04:40 AM
#1
impor sys
from PIL import image
from PIL.ExifTags import TAGS
image_file = sys.argv[1]
image_name = image_file.split(".")[0]

try:
    image = Image.open(image_file)
except IOError:
    print("Error in loading image!!")
    sys.exit(1)
   
bw_image = image.convert('L')
bw_image.save("bw_"+image_name+".png")
Reply
#2
thank you so much its nice
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [ E-BOOK ] BLACK HAT PYTHON PROGRAMMING mrJ3tt 5 554 02-18-2024, 10:29 AM
Last Post: suzugodess
  Retrieving Firefox Cookies Using Python Aurora 15 5,137 01-23-2024, 06:04 PM
Last Post: ncxcccccc
  [Tutorial] Bruteforce Any RDP Using Python 0x666 10 2,061 01-23-2024, 02:34 PM
Last Post: PMoney
  Python Requests 1.1 - Downtime Checker swag 3 1,927 10-17-2023, 10:44 PM
Last Post: popadonpin
  python script into your website whitenigger 6 2,198 10-12-2023, 12:06 PM
Last Post: whitenigger



 Users browsing this thread: 1 Guest(s)