[gegl] sinus: fix mipmap scaling



commit 98479610ce0f524efd8885a05e552469298aabf9
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Feb 17 20:05:04 2017 +0100

    sinus: fix mipmap scaling

 operations/common/sinus.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/sinus.c b/operations/common/sinus.c
index 2dddc71..e6d5625 100644
--- a/operations/common/sinus.c
+++ b/operations/common/sinus.c
@@ -248,11 +248,15 @@ process (GeglOperation       *operation,
   for (j = roi->y; j < roi->y + roi->height; j++)
     {
       y = ((gdouble) j) / o->height;
+      if (level)
+        y *= (1<<level);
       for (i = roi->x; i < roi->x + roi->width; i++)
         {
           gdouble c;
 
           x = ((gdouble) i) / o->width;
+          if (level)
+            x *= (1<<level);
 
           c = 0.5 * sin(p->c31 * x + p->c32 * y + p->c33);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]