[gimp] file-pnm: Remove clamping when loading PFM files



commit bfcb7fc593a2dc2d910f94ef9b2379ec97a592a0
Author: Tobias Ellinghaus <me houz org>
Date:   Tue Oct 30 13:37:07 2018 +0100

    file-pnm: Remove clamping when loading PFM files

 plug-ins/common/file-pnm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c
index 6131efde61..2d52414f48 100644
--- a/plug-ins/common/file-pnm.c
+++ b/plug-ins/common/file-pnm.c
@@ -1020,7 +1020,10 @@ pnm_load_rawpfm (PNMScanner *scan,
            * little vague about what the scale factor should be used
            * for */
           data[x] *= fabsf (info->scale_factor);
-          data[x] = fmaxf (0.0f, fminf (FLT_MAX, data[x]));
+          /* Keep values smaller than zero. That is in line with what the
+           * TIFF loader does. If the user doesn't want the negative numbers
+           * he has to get rid of them afterwards */
+          /* data[x] = fmaxf (0.0f, fminf (FLT_MAX, data[x])); */
         }
 
         gegl_buffer_set (buffer,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]