Question: Use python 3 Write a program to apply a 'negative' filter on a greyscale image. The program should ask the user to enter a filename,
Use python 3
Write a program to apply a 'negative' filter on a greyscale image. The program should ask the user to enter a filename, open this file, perform the transformation (as described below) and then save the negative version of the image to the file 'output.png'.
To perform the negative effect, set each pixel in the output image to the opposite colour value than the corresponding pixel in the input image. For example, a colour value of 0 would become 255, 1 would become 254, 253 would become 2, and so on.
Here is an example of the effect your program should produce:
Enter a filename: astronaut.png


Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
