from PIL import Image img = Image.open('grey.jpg') width, height = img.size for x in range(width): for y in range(height): pixel = img.getpixel((x,y)) red = pixel[0] green = pixel[1] blue = pixel[2] grey = (red + green + blue) // 3 img.putpixel((x,y), (grey,grey,grey)) img.save("grey2.jpg", "jpeg")
grayscale image processing
grayscale image processing
|
|
Messages In This Thread |
grayscale image processing - by zyb1003 - Oct-24-2017, 07:34 PM
RE: grayscale image processing - by Larz60+ - Oct-24-2017, 07:43 PM
RE: grayscale image processing - by zyb1003 - Oct-24-2017, 09:04 PM
RE: grayscale image processing - by Mekire - Oct-24-2017, 07:44 PM
RE: grayscale image processing - by Mekire - Oct-24-2017, 09:19 PM
RE: grayscale image processing - by zyb1003 - Oct-24-2017, 09:40 PM
RE: grayscale image processing - by Mekire - Oct-24-2017, 10:08 PM
RE: grayscale image processing - by heiner55 - Oct-25-2017, 06:25 AM
RE: grayscale image processing - by zyb1003 - Oct-25-2017, 07:07 PM
RE: grayscale image processing - by Mekire - Oct-25-2017, 07:12 PM
RE: grayscale image processing - by heiner55 - Oct-26-2017, 05:33 AM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Pillow Image Processing | matteusbeus | 2 | 3,603 |
Nov-02-2017, 03:07 PM Last Post: DeaD_EyE |
Users browsing this thread: 1 Guest(s)