FaeriCode

Hello! I'm a college student with a major in Computer Science, and this blog will be an inventory of all the codes I come across. You're welcome to use these codes for whatever you like. Thanks for stopping by!

Tuesday, December 17, 2013

Randomizes the RGB Values in each Pixel

def randomizePic (picture):
  for p in getPixels(picture):
    red = getRed(p)
    green = getGreen(p)
    blue = getBlue(p)
    setRed(p, red+int(random.random()*100))
    setGreen(p, green+int(random.random()*100))
    setBlue(p, blue+int(random.random()*100))
Posted by FaeriMagic at 2:24 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Fall 2013, Jython (JES)

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Pages

  • Home
  • Jython (JES)
  • Finch

Blog Archive

  • ▼  2013 (27)
    • ▼  December (27)
      • SlideShow Code
      • Echo a Sound
      • Produce a Negative
      • Mix Three Sounds
      • Interleave Two Sounds
      • Mix Two Sounds
      • Double the Frequency
      • Reverse a Sound
      • Copy a Sound into a Target
      • Clip a Sound
      • XOR
      • Finch Orientation
      • Enlarge an Image
      • Shrink an Image
      • Make the Finch say Something
      • Mirror an Image Vertically
      • Mirror an Image Horizontally
      • Grayscale a Picture
      • Randomizes the RGB Values in each Pixel
      • Change the Color of the Finch's Beak (+ Moving the...
      • Moving the Finch
      • Halve the sound's frequency
      • Shift all samples up by 32767
      • Make the bottom-right corner white
      • Set all Red values to Blue
      • Increase Volume in a Sound by 2
      • Increase the Blue in a Picture by 2

About Me

FaeriMagic
View my complete profile
Awesome Inc. theme. Powered by Blogger.