-
Notifications
You must be signed in to change notification settings - Fork 195
/
pgmimage.h
46 lines (35 loc) · 825 Bytes
/
pgmimage.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
38
39
40
41
42
43
44
45
46
/*
******************************************************************
* HISTORY
* 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University
* Prepared for 15-681, Fall 1994.
*
******************************************************************
*/
#ifndef _PGMIMAGE_H_
#define _PGMIMAGE_H_
typedef struct {
char *name;
int rows, cols;
int *data;
} IMAGE;
typedef struct {
int n;
IMAGE **list;
} IMAGELIST;
/*** User accessible macros ***/
#define ROWS(img) ((img)->rows)
#define COLS(img) ((img)->cols)
#define NAME(img) ((img)->name)
/*** User accessible functions ***/
IMAGE *img_open();
IMAGE *img_creat();
void img_setpixel();
int img_getpixel();
int img_write();
void img_free();
void imgl_load_images_from_textfile();
IMAGELIST *imgl_alloc();
void imgl_add();
void imgl_free();
#endif