Jython convert picture to grayscale and then negate it
Please bear with me, I've only started python a few weeks ago. I am using JES. I have made a function to convert a picture to grayscale. I created two names for each color r and r1, g and g1, b and b1. The idea behind this, was to keep the original values in memory, so the picture could be restored to it's original color. def grayScale(pic): for p in getPixels(pic): r = int(getRed(p)) g = int(getGreen(p)) b = int(getBlue(p))//I have tried this with and without the int() r1=r g1=g b1=b new = (r + g + b)/3 color= makeColor(new,new,new) setColor(p, color) def restoreColor(pic): for p in getPixels