Lab 4

Image Filters

Thus far, you have designed your programs to perform a single task—print an ASCII pattern, calculate interest rates, etc. In this lab, you will create a single program with the ability to perform many different tasks. You will be creating a photo editor! This editor will be able to read in an image and apply a sequence of pre-defined image filters, as specified by the user. These filters include functions for inverting an image, flipping it, increasing or decreasing the contrast, etc. In addition to giving you practice writing larger programs, this lab is a chance to get truly comfortable with nested for loops, while loops, functions, and image manipulation.


  • Implement your first multi-component program
  • Practice writing functions
  • Become familiar with image manipulation
  • Get even more practice with nested loops

Instructions describing what commands are available for manipulating images can be found here.