[gimp/goat-invasion: 368/608] app: the dissolve op now matches pixel perfectly
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 368/608] app: the dissolve op now matches pixel perfectly
- Date: Fri, 27 Apr 2012 20:56:19 +0000 (UTC)
commit 52cc9751b6447a78c3f91252ea877ab9244ed50b
Author: Ãyvind KolÃs <pippin gimp org>
Date: Sat Mar 31 22:31:12 2012 +0100
app: the dissolve op now matches pixel perfectly
app/gegl/gimpoperationdissolvemode.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/app/gegl/gimpoperationdissolvemode.c b/app/gegl/gimpoperationdissolvemode.c
index 32e03cf..9ca3ccd 100644
--- a/app/gegl/gimpoperationdissolvemode.c
+++ b/app/gegl/gimpoperationdissolvemode.c
@@ -125,24 +125,24 @@ gimp_operation_dissolve_mode_process (GeglOperation *operation,
for (x = result->x; x < result->x + result->width; x++, i++)
{
- gdouble rand_val;
+ int rand_val;
/* dissolve if random value is >= opacity */
rand_val = g_rand_int_range (gr, 0, 255);
- if (aux[3] * 255 >= rand_val)
- {
- out[0] = aux[0];
- out[1] = aux[1];
- out[2] = aux[2];
- out[3] = 1.0;
- }
- else
+ if (rand_val >= aux[3] * 255)
{
out[0] = in[0];
out[1] = in[1];
out[2] = in[2];
out[3] = in[3];
}
+ else
+ {
+ out[0] = aux[0];
+ out[1] = aux[1];
+ out[2] = aux[2];
+ out[3] = 1.0;
+ }
in+=4;
out+=4;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]