13
/*#########################################################################
15
#########################################################################*/
18
typedef struct GrayMap_def GrayMap;
20
#define GRAYMAP_BLACK 0
21
#define GRAYMAP_WHITE 765
36
void (*setPixel)(GrayMap *me, int x, int y, unsigned long val);
41
unsigned long (*getPixel)(GrayMap *me, int x, int y);
46
int (*writePPM)(GrayMap *me, char *fileName);
53
void (*destroy)(GrayMap *me);
74
unsigned long *pixels;
77
* Pointer to the beginning of each row
87
GrayMap *GrayMapCreate(int width, int height);
96
/*#########################################################################
98
#########################################################################*/
109
typedef struct RgbMap_def RgbMap;
124
void (*setPixel)(RgbMap *me, int x, int y, int r, int g, int b);
130
void (*setPixelRGB)(RgbMap *me, int x, int y, RGB rgb);
135
RGB (*getPixel)(RgbMap *me, int x, int y);
140
int (*writePPM)(RgbMap *me, char *fileName);
147
void (*destroy)(RgbMap *me);
166
* The allocated array of pixels
171
* Pointers to the beginning of each row of pixels
183
RgbMap *RgbMapCreate(int width, int height);
192
/*#########################################################################
193
### I N D E X E D M A P
194
#########################################################################*/
197
typedef struct IndexedMap_def IndexedMap;
202
struct IndexedMap_def
212
void (*setPixel)(IndexedMap *me, int x, int y, unsigned int index);
218
unsigned int (*getPixel)(IndexedMap *me, int x, int y);
223
RGB (*getPixelValue)(IndexedMap *me, int x, int y);
228
int (*writePPM)(IndexedMap *me, char *fileName);
235
void (*destroy)(IndexedMap *me);
254
* The allocated array of pixels
256
unsigned int *pixels;
259
* Pointers to the beginning of each row of pixels
269
* Color look up table
281
IndexedMap *IndexedMapCreate(int width, int height);
288
#endif /* __IMAGEMAP_H__ */
290
/*#########################################################################
291
### E N D O F F I L E
292
#########################################################################*/