As in the previous lesson, you’ll use the PIL Python library again to write a script that manipulates image files. You will be applying a three-step algorithm in order to create negative bitmap images.
Follow these instructions to do this.
Check your code by comparing to this file.
Share your results and any problems you encounter in the comments.
And to build context for this activity in the classroom, discuss the following questions with your fellow participants:
Can you think of any scenarios where you have seen negative images or videos?
Why would you want to create a digital image negative? What could you use it for?
Let’s explore how you can create your own lighten filter.
Follow these instructions to do this.
Check your code by comparing to this file.
Again, share your results with your peers and discuss any problems you encountered.
To pixelate an image, individual pixels are selected at regular intervals, and their colour is retrieved and duplicated over a nearby range of pixels. The interval at which pixels are selected defines the level of pixelation: in the example here, the algorithm creates pixelation in 8 × 8 rectangles.