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
  Useful links for developers Manfruity 36 2,333 Apr 24, 2026, 06:54 PM
Last Post: Weirdtatsum30777
  ⭐ Sektor7 - All courses (6 in total) ⭐ red_dot 599 38,576 Apr 23, 2026, 09:51 PM
Last Post: cwel321
  Discord Token Grabber | Private Stealer | Leaked For Free Piplup 351 57,826 Apr 21, 2026, 11:51 PM
Last Post: OldeChicago93
  WEBSITES FOR FREE INSTAGRAM FOLLOWERS ⭐ UHQ Moneygain 101 10,430 Feb 10, 2026, 03:02 PM
Last Post: onionX232
  How to buy crypto without KYC Manfruity 40 2,159 Feb 09, 2026, 10:55 PM
Last Post: Stevemox2

Forum Jump:


 Users browsing this forum: 1 Guest(s)