CS 17700 Study Guide - Final Guide: Alpha Compositing

39 views3 pages

Document Summary

The following function will result in a jes error. A function name can not begin with a capital letter. Q4. the following function is written to change the color of the pixels that have a white colored bottom neighbor to black. 8 show(picture) for y in range(0, getheight(picture)): pixel = getpixel(picture, x, y) testpixel = getpixel(picture, x, y+1) if(testpixel == white): setcolor(pixel, black) D) change line 3 to: for y in range(0, getheight(picture)-1): change line 2 to: for x in range(0, getwidth(picture)-1): change line 5 to: testpixel = getpixel(picture, x+1, y) swap white with black in the function. What does the alpha channel refer to: additional eight bits used to represent transparency in a picture, the dominant color in a picture, the brightness of a picture, the perceived luminance of a color. Q6. consider a picture of height 80 pixels and width 60 pixels.