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



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

    file-pnm: Remove clamping when loading PFM files
    
    (cherry picked from commit bfcb7fc593a2dc2d910f94ef9b2379ec97a592a0)

 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 3cd17a9514..77f205a4ee 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]