forked from tTh/FloatImg
tuning of the "normalize" option
This commit is contained in:
parent
085e19942a
commit
3bd387f0a9
@ -35,6 +35,9 @@ else {
|
|||||||
|
|
||||||
fp = stdout; /* XXX */
|
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); }
|
if (flags & 1) { fputs("X Y R G B\n", fp); }
|
||||||
|
|
||||||
for (y=0; y<src->height; y+=steps) {
|
for (y=0; y<src->height; y+=steps) {
|
||||||
@ -124,12 +127,8 @@ if (foo) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbosity) {
|
|
||||||
// fimg_describe(&fimg, srcname);
|
|
||||||
fprintf(stderr, "normalize to %f\n", norm);
|
|
||||||
}
|
|
||||||
if (norm > 0.0) {
|
if (norm > 0.0) {
|
||||||
// fprintf(stderr, "normalize %p\n", &fimg);
|
if (verbosity) fprintf(stderr, "normalize to %f\n", norm);
|
||||||
foo = normalize(&fimg, norm);
|
foo = normalize(&fimg, norm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,7 +162,7 @@ int main(int argc, char *argv[])
|
|||||||
int foo, opt;
|
int foo, opt;
|
||||||
int steps = 1;
|
int steps = 1;
|
||||||
int header = 0;
|
int header = 0;
|
||||||
float norm_val = 255.0; /* < 0 : don't normalize */
|
float norm_val = -1; /* < 0 : don't normalize */
|
||||||
// char separator = ' ';
|
// char separator = ' ';
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "f:hn:s:Tv")) != -1) {
|
while ((opt = getopt(argc, argv, "f:hn:s:Tv")) != -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user