From 9256a7ef7644f12c5e2f20400b7bf8943433e080 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 11 May 2007 17:23:20 +0200 Subject: limit output values --- src/Stitch.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Stitch.cxx') 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); } -- cgit v1.2.3