Title and Abstract: Project 5- Cover Photos. The goal of this project was to write more complex code to create a more complex collage than the previous project. For this code, I made each picture into a list using sys.argv and then created different effects per picture to overlay them and to play with the colors. The purpose of this assignment was to further our understanding in using Zelle graphics and to write efficient code while implementing all of these different features.
The first task, I used six images and places them around the screen, I also gave each of them a filter with some ratio of a rgb swap. To complete the first task, I had to create a getImageSize function which created the size of the canvas, this means that when I add an image to make the collage, even if it does overlap the previous image, it will increase the size of the canvas, and this function is able to take in the length, height, and placement of each image to determine the size of the canvas.
I also created buildCollage and placeImageNoBkg. buildCollage took in the filenames of each image, read them and opened them. The placeImageNoBkg function took the green screen photo of myself, and opened it with no background. I was able to do this by using a nested for loop to scan over all the pixels and to not display any part of the image with a green pixel.
Here is my image one collage with effects and alpha blending:
My image two took in three sub images with varying effects and overlapping. I did some trial and error to get the placement correct and finally made it so that it is about three times longer than its height. Since it was suppose to be a 'Facebook cover photo' I placed myself in the center of the image to make it look as though I am within and surrounded by the edited nature photos.
What I learned: I learned how to use Zelle graphics, and how to edit images by utilizing for loops to examine each pixel in the image to place effects on the image. I also learned how to account for a green screen or blue screen image to isolate a person or subjects of the photo. I was also able to understand calling things in command line arguments versus hard coding and how this can simplify my code. I also have a better grasp on how to index parameters to draw on them or preset them.
Collaborators: Andrew Turley
Imported Libraries: filter, graphics, collage, and sys