aboutsummaryrefslogtreecommitdiff
path: root/src/scaling-report.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scaling-report.c')
-rw-r--r--src/scaling-report.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/scaling-report.c b/src/scaling-report.c
index 2cfafd09..70bc78ad 100644
--- a/src/scaling-report.c
+++ b/src/scaling-report.c
@@ -418,17 +418,21 @@ static void scale_factor_histogram(cairo_t *cr, const struct image *images,
}
}
- /* Count the number of bins with no counts, subtract 1 from
- * the maximum value until this isn't the case */
n_zero = 0;
n_half = 0;
- for ( b=0; b<nbins; b++ ) {
- if ( counts[b] == 0 ) n_zero++;
- n_half++;
- }
- n_half /= 2;
+ if ( osf_max > 10.0 ) {
- if ( n_zero > n_half ) osf_max -= 1.0;
+ /* Count the number of bins with no counts, subtract 1
+ * from the maximum value until this isn't the case */
+ for ( b=0; b<nbins; b++ ) {
+ if ( counts[b] == 0 ) n_zero++;
+ n_half++;
+ }
+ n_half /= 2;
+
+ if ( n_zero > n_half ) osf_max -= 1.0;
+
+ }
} while ( n_zero > n_half );