Quote (Hboy @ Apr 23 2017 07:16pm)
Function #1: Use the negativePixel function as a pattern to implement this. Name the function removeRed. The function will receive one parameter, the oldpixel, and it must return the newPixel
Presumably you already have a negativePixel function which modifies RGB values. I would assume you would duplicate and modify that to removeRed, which sets RGB value to zero for red.
Quote (Hboy @ Apr 23 2017 07:16pm)
Function #2: Use the function makeNegative as a pattern to implement this. Name the function makeRedLess. The function will receive one parameter, the name of the image file that will have the red color removed from all of it's pixels.
Presumably you already have a makeNegative function which takes a filename and iterates over pixels with calls to negativePixel. Just duplicate and replace the calls with removeRed.
Quote (Hboy @ Apr 23 2017 07:16pm)
Function #1: Use the negativePixel function as a pattern to implement this. Name the function makeSepia. The function will receive one parameter, the oldpixel, and it must return the newPixel.
Same as above with the provided formulas.
Quote (Hboy @ Apr 23 2017 07:16pm)
Function #2: Include in your program the existing (pre-written) pixelMapper function furnished to you in this week's examples.
Sounds like nothing to do here.
Quote (Hboy @ Apr 23 2017 07:16pm)
Function #3: Modify the generalTransform function again furnished to you, so that instead of using the grayPixel function it uses the makeSepia function you just created.
Just replace the grayPixel calls in generalTransform with the new function.
Quote (Hboy @ Apr 23 2017 07:16pm)
All three functions, the makeSepia function, the pixelMapper function, and the newly modified generalTransform function should be inside one Python program. The last line in the Python program should be to call the generalTransform function to apply the Sepia tone to the image "lutherBell.gif"
Not much to do here.
Looks pretty straightforward if you have the previous iteration of work the instructions reference.