In this mini-lab you will gain practice with using Python
to process all pixels in a picture.
# Mini-Lab: Functions that Manipulate Pixels in a Picture
# Your Name
# Today's Date
reduceRedfunction from the Pictures and Loops notes. Remember to add a comment for this particular function, such as:
# Reduce the amount of red in a picture by 25%
Debugging Tip: If the function does not work correctly, check that you remembered the colon at the end of the first line of the function definition and that you spelled all of your variable names and function names correctly. After any edits, remember to click on the Load button before calling your function.
increaseRedfunction from the notes. Remember to add a comment for each function.
Analysis Questions: What similarities do you see between theInclude your answers to these analysis questions in comments in your program after your
reduceRedfunction and the
increaseRedfunction? What differences are there between the two functions?
showRedChannelthat sets the blue and green values for each pixel in an image to be equal to the red value. For example, a pixel with the value (RED=123, GREEN=18, BLUE=222) would be changed to (RED=123, GREEN=123, BLUE=123).
Analysis Questions: How doesInclude your answers to these analysis questions in comments in your program, either before or after your
showRedChannelaffect the appearance of your picture? What happens to regions of the original picture that were red? What happens to regions of the picture that were blue?
makeSunsetfunction from the notes. Test this on several different pictures. Remember to add a comment for this function.