For this Project, I edited an image using Python. The code that I wrote looped over every pixel in the image. This means that I created a set of instructions that told Python to examine every single pixel in the image, going row by row. I used these instructions to manipulate images by then assigning certain parameters to the code, and this code would alter the Pixels, resulting in a different image.
The first task was to create a set of filters that would alter the image. The instructions that I wrote contained loops, so Python did the exact same thing to every pixel in the image. For every pixel, I told Python to change the r,g,b color channels slightly. The changed image you see below is the result of pixel-level modifications. Because I told Python to do the same thing to every Pixel, however, the resulting image is cohesive and you can't tell that individual pixels were changed. I did this three times, and a screenshot is included below.
The next task was to create an image in the style of Andy Warhol. To do this, I first cloned my original Pixmap 4 times, entering it into the main table as something different each time. Next, I applied the filters I created in filter.py to each clone, after importing the filter file. After this step, I created a new blank image that was twice the height and twice the width of my pixmap, so that I could place four different versions of the pixmap in this image. I then specified where each image should go. Instead of using coordinates, however, I use the height and width of the original image, since the height/width correspond to the locations on the x,y axis. My resulting image is below.
The final task was to create instructions that would replace a super green screen (like the one I was standing in front of) with another color. Using the loop codes I made earlier, I added in a parameter that would recognize if a pixel was super green. If a pixel had twice as much red as green, or the green was less than the blue, my code changed the pixel channels slightly, which resulted in a screen of another color in the background. This is my image.
In this Project, I learned how I can use loops to manipulate an image at the pixel level. Each image that we see is actually a compilation of thousands of pixels, and to change the picture you have to change each pixel individually. This is made much easier by using Python, which can check every pixel individually. By telling Python to look for certain traits in each pixel, I can manipulate pixels separately from each other.
I worked with Ben Kwass, Will Pepi, and Lily Wain.