From 3bd387f0a9ade7c340f06e6c875fce04679662b5 Mon Sep 17 00:00:00 2001 From: tTh Date: Wed, 18 Oct 2023 16:08:51 +0200 Subject: [PATCH] tuning of the "normalize" option --- tools/fimg2text.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/fimg2text.c b/tools/fimg2text.c index 9e9aa9e..7b19a3d 100644 --- a/tools/fimg2text.c +++ b/tools/fimg2text.c @@ -35,6 +35,9 @@ else { fp = stdout; /* XXX */ +/* + * put a first line, so we can load those data with R + */ if (flags & 1) { fputs("X Y R G B\n", fp); } for (y=0; yheight; y+=steps) { @@ -124,12 +127,8 @@ if (foo) { return -1; } -if (verbosity) { - // fimg_describe(&fimg, srcname); - fprintf(stderr, "normalize to %f\n", norm); - } if (norm > 0.0) { - // fprintf(stderr, "normalize %p\n", &fimg); + if (verbosity) fprintf(stderr, "normalize to %f\n", norm); foo = normalize(&fimg, norm); } @@ -163,7 +162,7 @@ int main(int argc, char *argv[]) int foo, opt; int steps = 1; int header = 0; -float norm_val = 255.0; /* < 0 : don't normalize */ +float norm_val = -1; /* < 0 : don't normalize */ // char separator = ' '; while ((opt = getopt(argc, argv, "f:hn:s:Tv")) != -1) {