# Pages CS 151 Computational Thinking Fall 2012 cs151s10proj5(Philip Prosapio) Page History

## Key

• This line was removed.
• Formatting was changed.

...

for item in clist:
filename = item(0)
x0 = item(1)
y0 = item(2)
operator = item(3)
alpha = item(4)
useChromakey = item(5)
source = item(-1)

2)For the second task, I had to find a way to make it so the blue background would not be added into the collage, so I added an if statement to get this accomplished. I had python compare the blue values of each pixel to determine which pixels to bring in.

...

4) In the fourth task, I took four pictures, three from the lab and the other was the blue screen picture of me, and plugged them into the collage information list that the function buildCollage() is based off of.

clist = [ [ argv(1), 0, 0, 'rbswap', 0.8, False, None ],
[ argv(2), 25, 150, 'original', 1.0, True, None ],
[ argv(3), 0, 150, 'rgswap', 0.5, False, None],
[ argv(4), 150, 50, 'ynegate', 0.3, False, None]]

...

Extensions
Extension 1- The first extension that I completed fulfills the extension that required me to make new functions that implemented different geometric organization of my pictures in my collage. For this extension I made two different functions/pictures. These are squarecollage() and dianmond(). The first one just makes a simple square out of pictures, but the second one is more complicated in which the two different pictures are used with multiple different effects to create a diamond shape. For the diamond function the big thing I needed to solve was the x and y placements of the pictures, here is some code to show how I solved that.

topwidth = collageList(0)(-1).getWidth()
collageList(0)(1) = topwidth
collageList(1)(1) = topwidth/2
collageList(2)(1) = (3*topwidth)/2

The pictures for this extension are attached and named picture3lab5.png and picture4lab5.png .

...