diff options
-rw-r--r-- | src/GipfelWidget.cxx | 1 | ||||
-rw-r--r-- | src/Stitch.cxx | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index c8a2fae..7abb1dd 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -756,7 +756,6 @@ GipfelWidget::get_pixel_bicubic(Fl_Image *img, double x, double y, *r = (int) rint(interp_cubic(dy, dy2, dy3, c1[0])); *g = (int) rint(interp_cubic(dy, dy2, dy3, c1[1])); *b = (int) rint(interp_cubic(dy, dy2, dy3, c1[2])); - return 0; } diff --git a/src/Stitch.cxx b/src/Stitch.cxx index 49d2c77..0038b28 100644 --- a/src/Stitch.cxx +++ b/src/Stitch.cxx @@ -122,6 +122,10 @@ Stitch::resample(GipfelWidget::sample_mode_t m, if (gipf[i]->get_pixel(m, a_view, a_nick, &r, &g, &b) == 0) { + r = MAX(MIN(r, MAX_VALUE), 0); + g = MAX(MIN(g, MAX_VALUE), 0); + b = MAX(MIN(b, MAX_VALUE), 0); + if (single_images[i]) { single_images[i]->set_pixel(x, r, g, b); } |