Lab 5

Due Wednesday 3/7, 5:00pm

    1. For this assignment, you will continue work on Project 2 by adding the following methods to your ImageManipulator class:
    2. public void lighten(double amount) - This method takes as input a floating point number between 0 and 1 that indicates by how much the image should be lightened. For each pixel, it will set its new red value to be (1-amount)oldred + amount*255, doing the same for green and blue. The new image will be saved to a file lighter.gif.
    3. public void darken(double amount) - This method takes as input a floating point number between 0 and 1 that indicates by how much the image should be darkeed. For each pixel, it will set its new red value to be (1-amount)oldred, doing the same for green and blue. The new image will be saved to a file darker.gif.
      1. public void flipHorizontal() - This method takes no input and will flip the image along the horizontal axis, effectively creating a mirror image. The new image will be saved to a file called horizontalflip.gif.
      2. public void scrollHorizontal(int numpixels) - This method takes as input a number of pixels and scrolls the image by that amount horizontally. The image will be shifted to the left, and the leftmost numpixels will appear on the right side of the image. The new image will be saved to a file scrollhorizontal.gif.
      3. public void scrollVertical(int numpixels) - This method takes as input a number of pixels and scrolls the image by that amount vertically. The image will be shifted up, and the topmost numpixels will appear on the bottom of the image. The new image will be saved to a file scrollvertical.gif.
        1. Submission
        2. Please submit your work in an SVN directory https://www.cs.usfca.edu/svn/<username>/cs112/lab5
        3. Submission Instructions