Appendix G - pgm.h
1: #ifndef PGM_H
2: #define PGM_H
3:
4: /*max size of an image*/
5: #define MAX 800
6:
7: /*
8: #define LOW_VALUE 0
9: #define HIGH_VALUE 255
10: */
11:
12:
13: /*RGB color struct with integral types*/
14: typedef struct {unsigned char red;
15: unsigned char green;
16: unsigned char blue;
17: }RGB_INT;
18:
19: struct PGMstructure
20: {
21: int maxVal;
22: int width;
23: int height;
24: RGB_INT data[MAX][MAX];
25: };
26:
27: typedef struct PGMstructure PGMImage;
28:
29:
30: /***prototypes**********************************************************/
31: /***********************************************************************/
32:
33: void getPGMfile (char filename[], PGMImage *img);
34: void save(PGMImage *img);
35:
36: #endif