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!

Thursday, December 26, 2013

Produce a Negative

#This function prooduces a negative.
def negative(picture):
  for pixel in getPixels(picture):
    r = getRed(pixel)
    g = getGreen (pixel)
    b = getBlue(pixel)
    nucolor = makeColor(255-r, 255-g, 255-b)
    setColor (pixel, nucolor)
   
Posted by FaeriMagic at 9:13 AM
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.