These are individual projects spanning several weeks. Start Early! Starting on a project the weekend before the due date is a common way to fail (or drop) this course.
Your code will be tested on one of the department's Linux machines, probably pyrite.cs.iastate.edu. Your code must compile and run correctly on this machine. Code that does not compile may receive a grade of zero points! The projects will require one or two thousand of lines of code to implement (give or take; your mileage may vary). These should be organized into more than one source file, with the appropriate supporting documentation (a README file). Part of your grade will be on programming style: code should be legible and well-documented.
You must use a Makefile
, so that all your executables may be built by simply typing make in the shell.
You are responsible for understanding the project specifications. These are written in natural language (English), and may be vague or contradictory (it is not easy to describe what a thousand lines of code should do). There will be an online discussion forum for the course, where students may clarify any questions about the specifications. (This is another reason to start early.)
There are two utilities that should be used to help with your project.
./bmp2simp tank.bmp tank.simp
./simp2bmp tank.simp tank2.bmp
The final options should look like the following:
This section will be filled in with example SIMP files to be tested by your executables.
crop
Consider the files insanity.bmp, insanity.simp, c_insanity.simp, and c_insanity.bmp.
The following commands perform a crop:
./bmp2simp insanity.bmp insanity.simp ./crop insanity.simp c_insanity.simp 150 112 220 290 ./simp2bmp c_insanity.simp c_insanity.bmpAnd here are the effects (images are scaled in HTML only):
bw
Consider the files attached.bmp, attached.simp, bw_attached.simp, and bw_attached.bmp.
The following commands perform a black and white transform:
./bmp2simp attached.bmp attached.simp ./bw attached.simp bw_attached.simp ./simp2bmp bw_attached.simp bw_attached.bmpAnd here are the effects:
colorshift
Consider the files
./bmp2simp keanu.bmp keanu.simp ./colorshift keanu.simp keanurgb.simp RGB ./colorshift keanu.simp keanurbg.simp RBG ./colorshift keanu.simp keanurg.simp RG ./colorshift keanu.simp keanurb.simp RB ./colorshift keanu.simp keanugb.simp GB ./simp2bmp keanurgb.simp keanurgb.bmp ./simp2bmp keanurbg.simp keanurbg.bmp ./simp2bmp keanurg.simp keanurg.bmp ./simp2bmp keanurb.simp keanurb.bmp ./simp2bmp keanugb.simp keanugb.bmp
overlay
Consider the files doge.bmp, doge.simp, insanedoge.simp, and insanedoge.bmp.
The following commands perform an overlay:
./bmp2simp doge.bmp doge.simp ./overlay insanity.simp doge.simp insanedoge.simp 150 120 ./simp2bmp insanedoge.simp insanedoge.bmpAnd here are the effects:
More Test Cases: A TA from 229 Section 3 created the following test cases, if you want to further check your code.
Grading Test Cases: We use the following process to grade your executables.
tar czf netid.tar.gz
make clean
make
wget http://orion.math.iastate.edu/dstolee/229/project1/grading.tar.gz
tar czf grading.tar.gz
cat tests.txt >> Makefile
make grade
If you want to grade the different commands separately, then use these targets:
make gradebw
make gradecolorshift
make gradecrop
make gradeoverlay
meme
This command has several parts, so I will break down the necessary files into a few parts.
The Impact Font One possible font to use is called "Impact" and is defined by the files
Here is what the font looks like:Of course, other fonts are possible and will be used for testing.
The Memes
There will be several memes available for each call to meme
. Here are some files:
Of course, other memes are possible and will be used for testing.
The Actions
Every call to meme
will execute some action. Here are some files:
To execute these actions, use the following commands:
./bmp2simp impact.bmp impact.simp ./bmp2simp insanity.bmp impact.simp ./meme memes.mem insaneproject.act ./simp2bmp insane_project.simp insane_project.bmp ./bmp2simp confession.bmp confession.simp ./meme memes.mem confessproject.act ./simp2bmp confess_project.simp confess_project.bmp
And here is what is output.
Grading Test Cases: We use the following process to grade your executables.
tar czf netid.tar.gz
make clean
make
wget http://orion.math.iastate.edu/dstolee/229/project1/gradingb.tar.gz
tar xvf gradingb.tar.gz
cat testsB.txt >> Makefile
meme
, so you get +10 points for compiling.)
make gradememe
make memcheck
To test your output, download compare
and run the command as follows:
./compare img1.simp img2.simp
This will determine how many bytes are significantly different between the files, and also will tell if the files are not the same length. If your code works correctly, it should read "0 bytes significantly different."