Source and Image Files

You will need to download the following files:

You will also need the following image:

Compiling Source Code

To compile the code for this lab for the first time, follow these instructions:

  1. Download the required files to a directory on your workstation.
  2. Copy the skeleton code to the file that the Makefile is looking for by typing:
    cp lab1-skeleton.cc lab1.cc
  3. Build the program by typing:
    make lab1
At this point you will be ready to start implementing the changes needed for the lab.

Testing Code and Previewing Images

Your program will take two arguments. The first is the input image file, and the second is the output image file. After successfully compiling your code, the following command will test your program:

./lab1 test_image.png output.png

Before you make changes to lab1.cc, this will create a file output.png that will be identical to the input image. You can preview the image by typing:

eog output.png

When you have successfully completed the lab as outlined in the instructions, your output image should look like the image provided in the solutions.