[gimp] Bug 697862 - heal tool quality regression



commit c3c4287bdf730a387ec1b335de09c2b4dffcf01d
Author: Loren Merritt <pengvado akuvian org>
Date:   Fri Apr 12 08:08:24 2013 +0000

    Bug 697862 - heal tool quality regression
    
    Switch heal tool back to sRGB, which produces better quality than
    linear-light. It is, after all, trying to correct for differences in
    perceived brightness.

 app/paint/gimpheal.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/app/paint/gimpheal.c b/app/paint/gimpheal.c
index c2aaa6e..21e7034 100644
--- a/app/paint/gimpheal.c
+++ b/app/paint/gimpheal.c
@@ -510,11 +510,11 @@ gimp_heal_motion (GimpSourceCore   *source_core,
       return;
     }
 
-  src_copy =
-    gegl_buffer_new (GEGL_RECTANGLE (0, 0,
-                                     src_rect->width,
-                                     src_rect->height),
-                     babl_format ("RGBA float"));
+  /*  heal should work in perceptual space, use R'G'B' instead of RGB  */
+  src_copy = gegl_buffer_new (GEGL_RECTANGLE (0, 0,
+                                              src_rect->width,
+                                              src_rect->height),
+                              babl_format ("R'G'B'A float"));
 
   gegl_buffer_copy (src_buffer,
                     src_rect,
@@ -523,6 +523,9 @@ gimp_heal_motion (GimpSourceCore   *source_core,
                                     src_rect->width,
                                     src_rect->height));
 
+  /*  this is ok because we know that the paint_buffer is "RGBA float"  */
+  gegl_buffer_set_format (paint_buffer, babl_format ("R'G'B'A float"));
+
   gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
                     GEGL_RECTANGLE (paint_buffer_x, paint_buffer_y,
                                     gegl_buffer_get_width  (paint_buffer),


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