From 8c5065f8a99eee0b0edeeab3d9a7f815fa4d50df Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 4 Aug 2013 21:46:20 +0200 Subject: Moved BMP stuff to own file and fixed BMP generation. --- bmp.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bmp.h') 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 -- cgit v1.2.3-54-g00ecf