You will need to download the following files:
image.h
-
Header file for the library that will be used in labs throughout the course.
This contains the Image
class.
You will not need to modify this code in the course.
image.cc
-
Source file for image.h
.
You will not need to modify this code in the course.
Makefile
-
Contains instructions for the computer on how to compile our code.
lab1-skeleton.cc
-
Outline for the source file for this lab.
You will need to modify this code in the lab.
You will also need the following image:
test_image.png
- Input image for this lab.
To compile the code for this lab for the first time, follow these instructions:
Makefile
is looking for by typing:cp lab1-skeleton.cc lab1.cc
make lab1
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.