From 44cecf8d0b792c69cdfc398761d2ad27b05a122e Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 12 May 2020 00:06:05 +0200 Subject: Added dynamic range --- src/main.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 62cfed2..1ca92e1 100644 --- a/src/main.c +++ b/src/main.c @@ -28,6 +28,7 @@ struct prog_param uint8_t use_stdin; uint8_t use_whitespace; uint8_t fit_width; + uint8_t dynamic_range; }; struct prog_param parse_args(int argc, char *argv[]); @@ -133,10 +134,16 @@ int main(int argc, char *argv[]) }//for y }//for x - DEBUG_PRINTF("Brightness Values: Min: %u Max: %u\n", b_min, b_max); if(args.color) printf("\e[0m");//Default colors + + if(! args.dynamic_range) { + b_min = 0; + b_max = 255; + } else { + DEBUG_PRINTF("Dynamic Range: Brightness Values: Min: %u Max: %u\n", b_min, b_max); + } //Print buffer for(int y = 0; y