[gimp/pippin/linear-is-the-new-black: 14/14] app: normalize some alpha/opacity handling of some layer modes
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/pippin/linear-is-the-new-black: 14/14] app: normalize some alpha/opacity handling of some layer modes
- Date: Fri, 6 Jan 2017 02:39:55 +0000 (UTC)
commit 2a80ddabe638782c992d46944bbcb274974d9098
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Jan 6 03:36:35 2017 +0100
app: normalize some alpha/opacity handling of some layer modes
This makes overlay, Lch color, Lch hue, Lch saturation and Lch lightness mode
handle alpha similar to how Normal mode does.
app/core/core-enums.c | 2 +-
app/operations/gimpoperationlchchromamode.c | 2 +-
app/operations/gimpoperationlchcolormode.c | 2 +-
app/operations/gimpoperationlchhuemode.c | 2 +-
app/operations/gimpoperationlchlightnessmode.c | 2 +-
app/operations/gimpoperationoverlaymode.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index c1dd641..1239857 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -339,7 +339,7 @@ gimp_layer_mode_effects_get_type (void)
{ GIMP_OVERLAY_MODE, NC_("layer-mode-effects", "Old broken Overlay"), NULL },
{ GIMP_DIFFERENCE_MODE, NC_("layer-mode-effects", "Difference"), NULL },
{ GIMP_ADDITION_SRGB_MODE, NC_("layer-mode-effects", "Addition (non-linear)"), NULL },
- { GIMP_SUBTRACT_SRGB_MODE, NC_("layer-mode-effects", "Subtract"), NULL },
+ { GIMP_SUBTRACT_SRGB_MODE, NC_("layer-mode-effects", "Subtract (non-linear)"), NULL },
{ GIMP_DARKEN_ONLY_MODE, NC_("layer-mode-effects", "Darken only"), NULL },
{ GIMP_LIGHTEN_ONLY_MODE, NC_("layer-mode-effects", "Lighten only"), NULL },
{ GIMP_HUE_MODE, NC_("layer-mode-effects", "Hue (HSV)"), NULL },
diff --git a/app/operations/gimpoperationlchchromamode.c b/app/operations/gimpoperationlchchromamode.c
index b4dd037..632bf3f 100644
--- a/app/operations/gimpoperationlchchromamode.c
+++ b/app/operations/gimpoperationlchchromamode.c
@@ -139,7 +139,7 @@ chroma_post_process (const gfloat *in,
{
gfloat comp_alpha, new_alpha;
- comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
+ comp_alpha = layer[ALPHA] * opacity;
if (mask)
comp_alpha *= *mask++;
diff --git a/app/operations/gimpoperationlchcolormode.c b/app/operations/gimpoperationlchcolormode.c
index 4344877..ee14a13 100644
--- a/app/operations/gimpoperationlchcolormode.c
+++ b/app/operations/gimpoperationlchcolormode.c
@@ -128,7 +128,7 @@ color_post_process (const gfloat *in,
{
gfloat comp_alpha, new_alpha;
- comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
+ comp_alpha = layer[ALPHA] * opacity;
if (mask)
comp_alpha *= *mask++;
diff --git a/app/operations/gimpoperationlchhuemode.c b/app/operations/gimpoperationlchhuemode.c
index fe7d1b4..1fae4f9 100644
--- a/app/operations/gimpoperationlchhuemode.c
+++ b/app/operations/gimpoperationlchhuemode.c
@@ -139,7 +139,7 @@ hue_post_process (const gfloat *in,
{
gfloat comp_alpha, new_alpha;
- comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
+ comp_alpha = layer[ALPHA] * opacity;
if (mask)
comp_alpha *= *mask++;
diff --git a/app/operations/gimpoperationlchlightnessmode.c b/app/operations/gimpoperationlchlightnessmode.c
index 3c7f44f..79492a5 100644
--- a/app/operations/gimpoperationlchlightnessmode.c
+++ b/app/operations/gimpoperationlchlightnessmode.c
@@ -122,7 +122,7 @@ lightness_post_process (const gfloat *in,
{
gfloat comp_alpha, new_alpha;
- comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
+ comp_alpha = layer[ALPHA] * opacity;
if (mask)
comp_alpha *= *mask++;
diff --git a/app/operations/gimpoperationoverlaymode.c b/app/operations/gimpoperationoverlaymode.c
index cb7e573..e808e2e 100644
--- a/app/operations/gimpoperationoverlaymode.c
+++ b/app/operations/gimpoperationoverlaymode.c
@@ -95,7 +95,7 @@ gimp_operation_overlay_mode_process_pixels (gfloat *in,
{
gfloat comp_alpha, new_alpha;
- comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
+ comp_alpha = layer[ALPHA] * opacity;
if (has_mask)
comp_alpha *= *mask;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]