FaceRecognitionLib
Main Page
Classes
Files
File List
File Members
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
;
28
RGB_INT
data
[
MAX
][
MAX
];
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
savePGMfile
void savePGMfile(const char *filename, PGMImage *img)
Definition:
pgm.c:109
RGB_INT
Definition:
pgm.h:19
PGMstructure::width
int width
Definition:
pgm.h:26
PGMstructure
Definition:
pgm.h:24
MAX
#define MAX
Definition:
pgm.h:7
PGMstructure::height
int height
Definition:
pgm.h:27
PGMstructure::data
RGB_INT data[MAX][MAX]
Definition:
pgm.h:28
getPGMfile
void getPGMfile(const char *filename, PGMImage *img)
Definition:
pgm.c:11
RGB_INT::blue
unsigned char blue
Definition:
pgm.h:21
RGB_INT::red
unsigned char red
Definition:
pgm.h:19
RGB_INT::green
unsigned char green
Definition:
pgm.h:20
PGMstructure::maxVal
int maxVal
Definition:
pgm.h:25
Generated by
1.8.11