[gegl] color-overlay: fix output for semi-transparent color parameters
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] color-overlay: fix output for semi-transparent color parameters
- Date: Wed, 22 Aug 2018 18:07:59 +0000 (UTC)
commit dc32b3525530944ab5e47cc45f5be3c81623ed58
Author: Ell <ell_se yahoo com>
Date: Wed Aug 22 14:03:48 2018 -0400
color-overlay: fix output for semi-transparent color parameters
Premultiply the color-parameter components by the alpha before
processing. Got lost during space invasion.
operations/common/color-overlay.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/operations/common/color-overlay.c b/operations/common/color-overlay.c
index a18fac788..cd9489a1c 100644
--- a/operations/common/color-overlay.c
+++ b/operations/common/color-overlay.c
@@ -68,9 +68,13 @@ process (GeglOperation *operation,
const Babl *format = gegl_operation_get_format (operation, "output");
gfloat color[4];
gfloat alpha_c;
+ gint i;
gegl_color_get_pixel (o->value, format, &color);
+ for (i = 0; i < 3; i++)
+ color[i] *= color[3];
+
alpha_c = 1.0f - color[3];
if (fabs (alpha_c) <= EPSILON)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]