forked from tTh/FloatImg
fixing random bugs
This commit is contained in:
@@ -84,7 +84,7 @@ for (foo=0; foo<(head->width*head->height); foo++) {
|
||||
add = head->R[foo];
|
||||
add += head->G[foo];
|
||||
add += head->B[foo];
|
||||
head->R[foo] = head->G[foo] = head->B[foo] = add;
|
||||
head->R[foo] = head->G[foo] = head->B[foo] = add / 3.0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -168,11 +168,12 @@ if ( flags & 1 ) {
|
||||
head->fval, head->count,
|
||||
head->fval * head->count);
|
||||
fk = (head->fval * head->count) / 65535.0;
|
||||
fprintf(fp, "# fval/count %f %d\n", head->fval, head->count);
|
||||
}
|
||||
else {
|
||||
maximum = fimg_get_maxvalue(head);
|
||||
fk = maximum / 65535.0;
|
||||
fprintf(fp, "# maxval %15f\n# divisor %15f\n", maximum, fk);
|
||||
fprintf(fp, "# maxval %15f\n# divisor %15f\n", maximum, fk);
|
||||
}
|
||||
|
||||
fprintf(fp, "65535\n");
|
||||
|
||||
Reference in New Issue
Block a user