[gimp/pippin/linear-is-the-new-black: 3/3] app: unconditionally promote image to linear 32bit floating point



commit 8ff7e9f54297dfe89670cb02cdf8c31a8433f99f
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Dec 14 07:23:46 2016 +0100

    app: unconditionally promote image to linear 32bit floating point
    
    Whenever I open a JPG, I want to do this - before rotating/scaling,
    ultimately the precision menu should be even better hidden in the UI.

 app/file/file-open.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/app/file/file-open.c b/app/file/file-open.c
index cae912c..38a5c21 100644
--- a/app/file/file-open.c
+++ b/app/file/file-open.c
@@ -37,6 +37,7 @@
 #include "core/gimpdocumentlist.h"
 #include "core/gimpimage.h"
 #include "core/gimpimage-color-profile.h"
+#include "core/gimpimage-convert-precision.h"
 #include "core/gimpimage-merge.h"
 #include "core/gimpimage-undo.h"
 #include "core/gimpimagefile.h"
@@ -278,6 +279,12 @@ file_open_image (Gimp                *gimp,
     {
       gimp_image_undo_disable (image);
 
+      gimp_image_convert_precision (image, GIMP_PRECISION_FLOAT_LINEAR,
+                                           GEGL_DITHER_NONE,
+                                           GEGL_DITHER_NONE,
+                                           GEGL_DITHER_NONE,
+                                           progress);
+
       gimp_image_import_color_profile (image, context, progress,
                                        run_mode == GIMP_RUN_INTERACTIVE ?
                                        TRUE : FALSE);


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