Assignment two was quite interesting.
When I first opened both files I wasn't quite sure what would the end product look like. Hopefully, during lecture Professor Heap explained the end product. The descriptions or "hints" were a very useful guide to understand what was I suppose to fix. Although it seemed simple I still went to office hours and this was even more helpful! I definitely encourage you guys to go to office hours and ask questions!
The first file I opened was fx.rkt, the purpose of this was to change the color of the chameleon by averaging the intensities of the color that make up the image. The image is made up of red, green, blue and alpha (the opacity). Depending on which key you decided to press the program would average that specific color. If you decided you press all three keys r, g and b which stand for red, green and blue, respectively you would end up with a black and white image (Figure 1).
|
Figure 1. The first "row" represents the original image without any color change. The second row displays what occurred when the red (r), green (g) and blue (b) keys, respectively, were pressed once. As you can see, for the second row each one of the images have different shades depending on which key was pressed. When you pressed the same key twice it jumped back to the original image, this is way the third row has the exact same images as row 1. The last row describes the output of pressing all three keys at the same time, since all three colors where extracted the image displays a black and white chameleon.
|