[gimp] app: fix non-premultiplied case in GimpOperationNormalMode
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix non-premultiplied case in GimpOperationNormalMode
- Date: Wed, 2 May 2012 16:32:32 +0000 (UTC)
commit 1f9606e2002d46ed8a6010ca9376a612cdd2dbe3
Author: Michael Natterer <mitch gimp org>
Date: Fri Apr 6 21:53:16 2012 +0200
app: fix non-premultiplied case in GimpOperationNormalMode
app/gegl/gimpoperationnormalmode.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/gegl/gimpoperationnormalmode.c b/app/gegl/gimpoperationnormalmode.c
index ab865cf..1b531d5 100644
--- a/app/gegl/gimpoperationnormalmode.c
+++ b/app/gegl/gimpoperationnormalmode.c
@@ -152,10 +152,10 @@ gimp_operation_normal_mode_process (GeglOperation *operation,
{
while (samples--)
{
- out[RED] = in[RED] * (1.0 - aux[ALPHA]) + aux[RED] * aux[ALPHA];
- out[GREEN] = in[GREEN] * (1.0 - aux[ALPHA]) + aux[GREEN] * aux[ALPHA];
- out[BLUE] = in[BLUE] * (1.0 - aux[ALPHA]) + aux[BLUE] * aux[ALPHA];
- out[ALPHA] = in[ALPHA] + aux[ALPHA] * (1.0 - in[ALPHA]);
+ out[0] = aux[0] * aux[3] + in[0] * in[3] * (1.0 - aux[3]);
+ out[1] = aux[1] * aux[3] + in[1] * in[3] * (1.0 - aux[3]);
+ out[2] = aux[2] * aux[3] + in[2] * in[3] * (1.0 - aux[3]);
+ out[3] = aux[3] + in[3] - aux[3] * in[3];
in += 4;
aux += 4;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]