[gimp/pippin/linear-is-the-new-black] app: avoid no-op precision convert on import
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/pippin/linear-is-the-new-black] app: avoid no-op precision convert on import
- Date: Thu, 15 Dec 2016 21:50:38 +0000 (UTC)
commit d4e62e5f7eabf49a189fb8fa2874dbe8bb1aa433
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Dec 15 22:50:14 2016 +0100
app: avoid no-op precision convert on import
app/file/file-open.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/app/file/file-open.c b/app/file/file-open.c
index 38a5c21..63cb67d 100644
--- a/app/file/file-open.c
+++ b/app/file/file-open.c
@@ -279,11 +279,13 @@ 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);
+ 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 ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]