Introduction to C++
Jonah Warrenjonah AT parsons DOT edu
http://www.feedtank.com/2005/cpp
Homework 6
(Please email me if you have any questions.)- Read Chapter 8. Functions cont.
- Review class code here.
- Using a RAW photo of your choice or this head dude, produce 3 other RAW files (and code) that process the image in some way. Use a function to process the pixels. BE CAREFUL ABOUT WHAT RAW FILE YOU USE IF YOU CHOOSE TO MAKE YOUR OWN. YOU CANNOT USE JPGS TO CREATE A RAW FILE. I REPEAT YOU CANNOT USE JPGS. IF THE IMAGE WAS EVER A JPG IN ITS LIFE, IT WILL NOT WORK. FIND GIFS, PNGs, OR TIFs. You can scan them in or create your own images in photoshop. I should talk about this in class.
- Using this same RAW file, produce 3 different ASCII versions of the same photo. Use a function to process the pixels. Instead of writing to a RAW file, you are going to be writing characters to a text file. Different ranges of pixel values should yeild different characters. You are going to need to use % and the image width to know when to do a line break in your text file.
You can use this program to see if your RAW file is working. If its working properly, it should print out the same image. If you are having problems, just use the dude with the glasses.