aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-04-28 12:09:49 +0200
committerThomas White <taw@physics.org>2010-04-28 12:09:49 +0200
commit49cfab70b76a0aa0ac3b6ceca86e50c3005b3875 (patch)
treeeaa99f5a7214f70b07427909f8f8841c36112202
parentaad3b1798b9ef488e7fb04e2a91f9b46c67d6eb6 (diff)
hdfsee: Fussiness
-rw-r--r--src/render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render.c b/src/render.c
index 00fac1ed..2307b381 100644
--- a/src/render.c
+++ b/src/render.c
@@ -510,7 +510,7 @@ int render_tiff_int16(DisplayWindow *dw, const char *filename)
if ( val > max ) max = val;
}
}
- max /= 32767;
+ max /= 32767.0;
for ( y=0; y<image->height; y++ ) {
for ( x=0;x<image->width; x++ ) {
@@ -521,8 +521,8 @@ int render_tiff_int16(DisplayWindow *dw, const char *filename)
val *= ((float)dw->boostint/max);
/* Clamp to 16-bit range */
- if ( val > 32767 ) val = 32767;
- if ( val < -32768 ) val = -32768;
+ if ( val > 32767.0 ) val = 32767.0;
+ if ( val < -32768.0 ) val = -32768.0;
line[x] = val;
}