[gimp] app: compare gamma-correced colors when finding contiguous regions



commit efd354b7335ddf5ae3bf59cb7d3e3be514fca048
Author: Michael Natterer <mitch gimp org>
Date:   Thu Jun 12 23:49:50 2014 +0200

    app: compare gamma-correced colors when finding contiguous regions
    
    This maps threshold changes by moving the mouse more uniformly to the
    growing/shrinking of the selected area, and the tools should work
    perceptually anyway. Also, it makes things another 10 times as fast on
    gamma-corrected drawables.

 app/core/gimppickable-contiguous-region.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimppickable-contiguous-region.c b/app/core/gimppickable-contiguous-region.c
index 1f16476..0b24bc0 100644
--- a/app/core/gimppickable-contiguous-region.c
+++ b/app/core/gimppickable-contiguous-region.c
@@ -243,17 +243,17 @@ choose_format (GeglBuffer          *buffer,
     {
     case GIMP_SELECT_CRITERION_COMPOSITE:
       if (babl_format_is_palette (format))
-        format = babl_format ("RGBA float");
+        format = babl_format ("R'G'B'A float");
       else
         format = gimp_babl_format (gimp_babl_format_get_base_type (format),
-                                   GIMP_PRECISION_FLOAT_LINEAR,
+                                   GIMP_PRECISION_FLOAT_GAMMA,
                                    *has_alpha);
       break;
 
     case GIMP_SELECT_CRITERION_R:
     case GIMP_SELECT_CRITERION_G:
     case GIMP_SELECT_CRITERION_B:
-      format = babl_format ("RGBA float");
+      format = babl_format ("R'G'B'A float");
       break;
 
     case GIMP_SELECT_CRITERION_H:


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