diff options
-rw-r--r-- | src/render.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/render.c b/src/render.c index c91a2658..1ea36ea1 100644 --- a/src/render.c +++ b/src/render.c @@ -108,10 +108,13 @@ float *render_get_image_binned(DisplayWindow *dw, int binning, float *max) \ r = 0; g = 0; b = 0; \ \ - if ( (val < 0.0) || (val > max) ) { \ + if ( (val < 0.0) ) { \ s = 0; \ p = 1.0; \ } \ + if ( (val > max) ) { \ + s = 6; \ + } \ switch ( s ) { \ case 0 : { /* Black to blue */ \ r = 0; g = 0; b = p*255; \ @@ -141,17 +144,13 @@ float *render_get_image_binned(DisplayWindow *dw, int binning, float *max) r = 255; g = 255; b = 255; \ break; \ } \ - default : { /* Above saturation */ \ - r = 255; g = 255; b = 255; \ - break; \ - } \ } #define RENDER_MONO \ float p; \ p = (float)val / (float)max; \ if ( val < 0.0 ) p = 0.0; \ - if ( val > max ) p = 0.0; \ + if ( val > max ) p = 1.0; \ r = 255.0*p; g = 255.0*p; b = 255.0*p; |