Notes for Homework 1
- Descriptions of PPM files, available here
and here.
- Example PPM files:
plank.ppm,
woodtex.ppm,
and woodtex2.ppm
- I suggest for problem 2, your function should work similar to one of the following schemes:
- int WritePPM( char *filename, int imgWidth, int imgHeight, unsigned char *imageToSave );
- None of the inputs should be changed by WritePPM(). (You could use const if you want.)
- filename would be the name of the file you create.
- imgWidth and imgHeight describe the size of the image you are going to output.
- inputImage is a pointer to an array containing your image (with size:
3*imgWidth*imgHeight*sizeof(unsigned char))
- I would return a value describing success/failure of the function.
- int WritePPM( char *filename, Image *imageToSave ); (or more likely: int Image::WritePPM( char *filename );)
- Here, Image is a class that encapsulates information about an image (e.g., size, internal format, data, etc.).
- A GLUT template program I use
[as a .tar.gz file] or
[as a .zip file]
- NOTE: This is not exactly what's needed for this assignment.
- Useful for checking you've got your environment set correctly to compile and run
OpenGL programs.
Last Modified: Friday, July 22, 2005
Chris Wyman (cwyman@cs.uiowa.edu)