############################################################################### # File: README # Author: Wade Spires # Date: 2005/04/06 # Description: Documentation for using class Image # Availability of a UNIX or GNU/Linux system is assumed. ############################################################################### First, (g)unzip and extract the file Image.tar.gz: Type 'tar xzf Image.tar.gz' in Linux; or 'gunzip Image.tar.gz; tar xf Image.tar;' if on an older UNIX system. The following files should be extracted: README err_mesg.c err_mesg.h example.cpp go gog Image.cpp Image.hpp makefile Doxyfile Here is a brief description for each of these files: README -- This file err_mesg.{c,h} -- C file for error handling example.cpp -- Example program using the Image class go -- Compiles and runs program gog -- Compiles and runs program in debugger (gdb) Image.cpp -- Source file for Image class; contains only a few functions Image.hpp -- Header file for Image class; contains majority of functions makefile -- Rules and dependencies for compiling Doxyfile -- Doxygen configuration file Before compiling anything, type 'make depend'. This only has to be done once, but must be done. Many supposed error messages will appear, but this is okay. The class was developed on a GNU/Linux system, so it should compile on any UNIX-like system with GCC installed. For compiling in UNIX/Linux, do the following: - To compile the code, type 'make'. - To compile and run the code, type 'go'. - To compile and debug the code, type 'gog'. To change the images used, change the lines 'in_img=in.pgm' and 'out_img=out.pgm' in the files go and gog to the input and output images one wishes to use. To change the name of the source file used, such as to modify it for another use, change the following lines in makefile to the new values: NAME = example SOURCES += example.cpp OBJECTS += example.o Also, in go and gog, change the word 'example' to the new name being used. To use the Image class, it is easiest to simply refer to the file example.cpp for an example of how it is used in real code. Creating Image objects, reading and writing PGM files, and accessing individual pixels are all shown in this file. err_mesg.{c,h} and Image.{cpp,hpp} are the actual implementation files for the Image class and are of limited use to a user. The file Doxyfile is a configuration file used by the program doxygen to generate html documentation for the Image class. If doxygen is installed, simply type 'doxygen' to create a directory html/ containing extensive documentation and point one's browser to html/index.html to view it.