Question: Problem B. (7 points) Sepia Filter Next, you will implement the sepia function. This function will apply a formula to all the pixels that will

 Problem B. (7 points) Sepia Filter Next, you will implement the
sepia function. This function will apply a formula to all the pixels

Problem B. (7 points) Sepia Filter Next, you will implement the sepia function. This function will apply a formula to all the pixels that will result in a faded coloring that gives an image an appearance of being from a long time ago. To do this, we will update every pixel's color values as follows: newred=red*39+green.75+blue*.19nowgreen=red*35+green.69+blue*17newblue=red.27+green.51+blue.13 Where "newred", "newgreen" and "newblue" mean the pixel's new color value for red, green and blue. Remember that all these color values should be ints between 0 and 255 , so make sure to enforce that is still the case after the filter is applied. To do this, you should truncate the floating point values down to integers using the intO function (not round), and any values above 255 should be set to 255. Examples: Problem C. (10 points) Mirror Next, you will be implementing the mirror function. This overwrites the right half of the image with a mirror image of the left (so within each list of lists representing a row of pixels, the pixels in the second half of the row are overwritten by a mirror image of the pixels in the first half). If there are an odd number of columns, the middle column remains unchanged. Examples

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!