Category : image

How can I get this to grayscale image even after taking the black_white variable away? I want the code to still return a grayscale image, but I’m not sure if I can shorten it a bit. import image def grayscale(input_image): grayscale_image = image.EmptyImage(input_image.getWidth(), input_image.getHeight()) for col in range(input_image.getWidth()): for row in range(input_image.getHeight()): p = input_image.getPixel(col, ..

Read more