This page describes the software we have installed for use in 15-463. Software listed here is generally useful. There may also be specific programs for use with particular assignments. You should look at the appropriate assignment page for relevant documentation.
Example Code: If you're wondering how to use all this stuff, try looking at my example program in pub/src/tifflmap/. It contains both an example Makefile and the C code for the program. It's a very simple example of reading a TIFF file, manipulating the pixels, and writing a TIFF file. It applies a linear map, ap + b to each channel of each pixel.
In order to easily use the software for the class, you will want to add various things to your .login file. Basically, you want to tell your shell where the binaries are, where the shared libraries are, and where the man pages are. Assuming that you're running csh, the lines below should do the trick. On Andrew, these lines should come after the sourcing of /usr/local/lib/global.login.
setenv cs463 /afs/andrew.cmu.edu/scs/cs/15-463/pub set path = ($path ${cs463}/bin) setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${cs463}/lib setenv MANPATH /usr/man:/usr/local/man:/usr/contributed/man:${cs463}/manOn SGI's, the LD_LIBRARY_PATH is not initially defined, so you just want to say
setenv LD_LIBRARY_PATH ${cs463}/liband you should use the following MANPATH instead:
setenv MANPATH /usr/share/catman:/usr/share/man:/usr/catman:/usr/man:/usr/local/man:${cs463}/pub/man
I suggest that you use something like the following at the beginning of your Makefiles.
CS463 = /afs/andrew/scs/cs/15-463/pub OPTFLAGS = -g # Or whatever optimization policies you want INCDIR = $(CS463)/include LIBDIR = $(CS463)/lib CFLAGS = -I$(INCDIR) $(OPTFLAGS) LFLAGS = -L$(LIBDIR) $(OPTFLAGS)Now, make sure that you use $(CFLAGS) when compiling C source code and $(LFLAGS) when linking. The compiler should be able to find the headers and libraries described below.
NOTE: In Andrew, an older version of libtiff is installed in /usr/local. Linking with this library should not cause you problems. However, you might want to make sure that you're using our version of the library just to be on the safe side.
To see how to use the TIFF library, I suggest you look at the source for pub/src/libpicio/tiff.c. When implementing your assignments, you have the option of using our libpicio routines to write TIFF files, or you can write your own. If you want to write you own, tiff.c should provide a good starting point.
Usage: xplay [options] PICFILE1 PICFILE2 ... Displays PPM or TIFF picture files in rapid sequence options: -zoom Z zoom picture by factor of Z (e.g. "-zoom 2" doubles) -newcm create a new colormap (makes playback look best, but might make other windows look odd) -ncolor N requests that N or fewer colors be used (default=256) -gray force grayscale display (only relevant on color display) -nodither don't dither pixel values -depth D requests depth of D bits per pixel, where D=24 or 8 (default is to try 24 first, then 8) -gamma G use a gamma of G. G>1 lightens, G>1 darkens. (default: G=1.7) -abbrev abbreviate file name in window name -grid don't perform adaptive color quantization