[gimp/pippin/linear-is-the-new-black: 5/11] app: unconditionally promote image to linear 32bit floating point
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/pippin/linear-is-the-new-black: 5/11] app: unconditionally promote image to linear 32bit floating point
- Date: Mon, 9 Jan 2017 13:56:45 +0000 (UTC)
commit 6bb572d455a4674aada88c0194f2b00979b9141c
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 | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/file/file-open.c b/app/file/file-open.c
index 8fccdd6..0996831 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,14 @@ file_open_image (Gimp *gimp,
{
gimp_image_undo_disable (image);
+ if (gimp_image_get_precision (image) != GIMP_PRECISION_FLOAT_LINEAR)
+
+ 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]