FaceRecognitionLib
pgm.h
Go to the documentation of this file.
1 // Source: https://sun.iwu.edu/~shelley/sie/zoo/journal/pgm.h.html
2 
3 #ifndef PGM_H
4 #define PGM_H
5 
6 /*max size of an image*/
7 #define MAX 800
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*
14 #define LOW_VALUE 0
15 #define HIGH_VALUE 255
16 */
17 
18 /*RGB color struct with integral types*/
19 typedef struct { unsigned char red;
20  unsigned char green;
21  unsigned char blue;
22  } RGB_INT;
23 
24 struct PGMstructure {
25  int maxVal;
26  int width;
27  int height;
29 };
30 
31 typedef struct PGMstructure PGMImage;
32 
33 /***prototypes**********************************************************/
34 /***********************************************************************/
35 
36 void getPGMfile(const char *filename, PGMImage *img);
37 void savePGMfile(const char *filename, PGMImage *img);
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif
void savePGMfile(const char *filename, PGMImage *img)
Definition: pgm.c:109
Definition: pgm.h:19
int width
Definition: pgm.h:26
Definition: pgm.h:24
#define MAX
Definition: pgm.h:7
int height
Definition: pgm.h:27
RGB_INT data[MAX][MAX]
Definition: pgm.h:28
void getPGMfile(const char *filename, PGMImage *img)
Definition: pgm.c:11
unsigned char blue
Definition: pgm.h:21
unsigned char red
Definition: pgm.h:19
unsigned char green
Definition: pgm.h:20
int maxVal
Definition: pgm.h:25