Review Exercise 5
XVGR class notes
Graphic Images class notes
Due Date: 3/30/01


Please complete the following Review Exercises.
Place your answers underneath each question using a
Unix text editor.  Turn in your answers as follows: turnin ex5 exercise5.txt 

1. In xvgr, what is the difference between save parameters and save all?

	Save Parameters will save everything about your graph
	EXCEPT the actual data values.
	Save All will save everything INCLUDING the actual data values.

2. In xvgr, what is the advantage to saving a parameter file?

	Most of the work is spent in creating the parameter file.
	You can then use the parameter file with many sets of data.

3. Show the grbatch command to read from parameter file: file.p and to
   create a postscript file named: file.ps

	grbatch -p file.p -printfile file.ps

4. Explain the general difference between a vector and raster image.

	A vector image normally stores only coordinates of vertices
	of lines and polygons.  To draw the actual line or polygon, the
	postscript processor calculates where the line will be based on
	those points. 

	A raster image normally considers an image to be a grid of values,
	where each cell in the grid has a unique value.  A black line would simply
	have all the cells that make up the line contain a value indicating
	the color black, e.g. 0.

5. What does the term 'color-depth' refer to in an image?

	Color depth normally is used in reference to a raster image.
	Each cell in the image can contain unique numeric values, however
	the magnitude of these values depends on the color-depth or
	bit-depth of the image.  For example, an image with a bit-depth
	of 8-bits can hold values in each cell from 0-255.  This is
	because a binary number with 8-bits can have a maximum value of 2^8 or 256.
	An image with a bit-depth of 24 can hold values in each cell of
	2^24 or 16,777,216.  A 2-bit image can hold values in each cell of
	2^2 or 0-3.  That is, each cell can hold either a 0, 1, 2 or 3,
	that's all.

6. If your image only contained 256 colors, what is the smallest bit-depth 
   you would need?

	8-bits

7. How can you display a postscript file on a Sun Workstation?
	
	gs file.ps or pageview file.ps or gsv file.ps

8. How can you display a JPEG file on a Sun Workstation?

	xv file.jpg or gimp file.jpg