aboutsummaryrefslogtreecommitdiff
path: root/pgm.h
diff options
context:
space:
mode:
Diffstat (limited to 'pgm.h')
-rw-r--r--pgm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/pgm.h b/pgm.h
new file mode 100644
index 0000000..b8900b8
--- /dev/null
+++ b/pgm.h
@@ -0,0 +1,16 @@
+#ifndef PGM_H
+#define PGM_H
+
+#include <stdio.h>
+#include <stdint.h>
+
+typedef struct {
+ uint8_t r, g, b;
+} color_t;
+
+color_t *color_set(color_t *c, uint8_t r, uint8_t g, uint8_t b);
+
+int pgm_write_header(FILE *fp, unsigned int w, unsigned int h);
+int pgm_write_pixel(FILE *fp, color_t *c);
+
+#endif