From 57b73d286ad68a71547cdfbb31c772fb46c96c67 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Wed, 29 Jul 2020 00:46:16 +0200 Subject: rebuilding functions --- src/main.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 532b93a..e9e04e3 100644 --- a/src/main.c +++ b/src/main.c @@ -1,3 +1,9 @@ +/* + * src/main.c + * (c) 2020 Jonas Gunz + * License: MIT +*/ + #include #include #include @@ -9,7 +15,7 @@ #include "m.h" #include "color.h" -/* #define CLEANUP 1 */ +// #define CLEANUP 1 #ifdef _DEBUG #warning "Compiling with DEBUG" @@ -50,10 +56,8 @@ int main(int argc, char *argv[]) uint8_t brightness_max = 0x00; uint8_t brightness_min = 0xff; - struct bitmap_pixel_data bitmap; - bitmap = bitmap_read(args.filename); - - if(bitmap.error) { + struct bitmap_image bitmap; + if ( bitmap_read(args.filename, &bitmap) ) { printf("Error reading file\n"); return 1; } @@ -172,6 +176,7 @@ int main(int argc, char *argv[]) DEBUG_PRINTF("Finished!\n"); #ifdef CLEANUP +#warning "Cleanup included" for(int i = 0; i < size_x; i++) free (image_monochrome[i]); free(image_monochrome); -- cgit v1.2.3