[gimp/goat-invasion: 429/608] app: fix non-premultiplied case in GimpOperationNormalMode
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 429/608] app: fix non-premultiplied case in GimpOperationNormalMode
- Date: Fri, 27 Apr 2012 21:01:27 +0000 (UTC)
commit 18483fc0974a604b149a105f49867644a0c3c3de
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]