-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.h
More file actions
32 lines (30 loc) · 748 Bytes
/
Copy pathheader.h
File metadata and controls
32 lines (30 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef HEADR_H
#define HEADER_H
// structre to containe the required parts of a ppm header
typedef struct ppm_header {
int version;
int width;
int height;
int maxValue;
} ppm_header;
/**
* Parses a PPM header and prints out version magic number and 3 numbers.
* PPM headers are in the format:
* <magic number>
* <whitespace>
* <number>
* <whitespace>
* <number>
* <whitespace>
* <number>
* where <magic num> is in the format [pP][0-9].
*
* Comments are also allowed. Comments begin with '#' and continue until the
* end of the line.
*
* PARAMETERS
* in - file pointer to header
* header - struct to store header info in
*/
void readHeader(FILE *in, ppm_header *);
#endif