Remember that it can take a bit of time to process all the pixels in a picture! Check for errors below the code if it is taking a long time, but if you don’t see any errors just wait.
Fix the 5 errors in the code, so that the red pixels get the value of the green, the green get the value of blue, and the blue get the value of the red. (The cat should look purple and gray)
Fix the 5 errors in the code, so that the red pixels get the value of the green, the green get the value of blue, and the blue get the value of the red. (The cat should look purple and gray)
The code below sets all the pixels to half their original values with one for loop. Change the code so it uses 2 for loops that utilize the range function (1 for loop should be nested in the other).
The code below sets all the pixels to half their original values with one for loop. Change the code so it uses 2 for loops that utilize the range function (1 for loop should be nested in the other).
Write code to create a subclass of the Image class with three different image effect functions and use each effect on a different part of the image. For example, you could turn the image into grayscale, keep only the green values, swap the red and green values, negate the image, etc. This is one possible solution. For example, the image shown below has one image effect on the first third of the image (negate), one on the second third (clear blue), and one on the final third (reduce red). It is using the image gal2.jpg
Create a subclass of the Image class with three different image effect functions and use each effect on a different part of the image. For example, you could turn the image into grayscale, keep only the green values, swap the red and green values, negate the image, etc. This is one possible solution. For example, the image shown below has one image effect on the first third of the image (negate), one on the second third (clear blue), and one on the final third (reduce red). It is using the image gal2.jpg