¡@

Home 

python Programming Glossary: makecolor

Jython convert picture to grayscale and then negate it

http://stackoverflow.com/questions/17158026/jython-convert-picture-to-grayscale-and-then-negate-it

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.. def restoreColor pic for p in getPixels pic setColor p makeColor r1 g1 b1 It's not working. The error local or global name could.. int 0.21 getRed px 0.71 getGreen px 0.07 getBlue px color makeColor level level level And to negate invert simply do level 255 level..

Creating a movie in Jython/Python

http://stackoverflow.com/questions/17288272/creating-a-movie-in-jython-python

range 0 540 r #some code g #some code b #some code color makeColor r g b px getPixel pic x y setColor px color numStr str x m m.. w h for x in range 0 w for y in range 0 h #makeColor takes red green and blue in that order between 0 and 255 r random.randint.. 0 255 g random.randint 0 255 b random.randint 0 255 color makeColor r g b px getPixel pic x y setColor px color # Create one frame..