diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-07-29 00:46:16 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-07-29 00:46:16 +0200 |
commit | 57b73d286ad68a71547cdfbb31c772fb46c96c67 (patch) | |
tree | d4410076f2b598fc6c8d0a07409c96eb0142e4b4 /src/main.c | |
parent | 6ef2e7f779497f1761331cc823a73d685f0d436b (diff) | |
download | AsciiMap-57b73d286ad68a71547cdfbb31c772fb46c96c67.tar.gz |
rebuilding functions
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,9 @@ +/* + * src/main.c + * (c) 2020 Jonas Gunz <himself@jonasgunz.de> + * License: MIT +*/ + #include <stdio.h> #include <stdlib.h> #include <stdint.h> @@ -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); |