-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPGM.h
37 lines (27 loc) · 1016 Bytes
/
PGM.h
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
33
34
35
36
37
#ifndef PGM
#define PGM
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
/*******************************************************************************
PGM.h
Author: Bob Crocco - Jet Propulsion Laboratory - 397Q
History:
07/10/20: B.Crocco. Created. Migrated code from AH_RockUtils
Usage:
header file to PGM.c
*****************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int read_pgm_image(char* infilename, unsigned char** image, int* rows, int* cols);
int read_pgm_image_rect(char* infilename, unsigned char* image, int startRow, int startCol, int rectNumRows, int rectNumCols);
int read_pgm_image_dimensions(char* infilename, int* rows, int* cols);
int write_pgm_image(char* outfilename, unsigned char* image, int rows, int cols, int maxval);
int write_ppm_image(char* outfilename, unsigned char* image, int rows, int cols);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* PGM */