summaryrefslogtreecommitdiff
path: root/bmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'bmp.h')
-rw-r--r--bmp.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/bmp.h b/bmp.h
index e9b2821..89ab893 100644
--- a/bmp.h
+++ b/bmp.h
@@ -6,7 +6,15 @@
#include "color.h"
-extern int bmp_write_header(FILE* fh, int32_t width, int32_t height);
-extern int bmp_write_pixel(FILE* fh, color_t col);
+typedef struct {
+ int32_t width, height;
+ size_t line_padding;
+ size_t line_left;
+ FILE* fh;
+} bmp_write_handle_t;
+
+extern bmp_write_handle_t* bmp_create(const char* fn, int32_t width, int32_t height);
+extern int bmp_write_pixel(bmp_write_handle_t* bmph, color_t col);
+extern void bmp_destroy(bmp_write_handle_t* bmph);
#endif \ No newline at end of file