fix scaling of samples for autolevels_mono
authorTony Cook <tony@develop-help.com>
Mon, 8 Feb 2016 08:29:04 +0000 (19:29 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 8 Feb 2016 08:30:52 +0000 (19:30 +1100)
filters.im

index d980fcb..081072f 100644 (file)
@@ -717,7 +717,7 @@ i_autolevels_mono(i_img *im, float lsat, float usat) {
 #else
   IM_WORK_T low = min_lum / 255.0 * IM_SAMPLE_MAX;
 #endif
-  IM_WORK_T scale = 255.0 / (max_lum - min_lum);
+  double scale = 255.0 / (max_lum - min_lum);
 
   for(y = 0; y < im->ysize; y++) {
     IM_GSAMP(im, 0, im->xsize, y, srow, NULL, color_channels);