]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 3 Oct 2014 10:28:51 +0000 (10:28 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 3 Oct 2014 10:28:51 +0000 (10:28 +0000)
MagickCore/effect.c

index 30ee86770a46b21112f4c312dfa5ae68553e1063..18d3aa9d14484eb087c1c3cdd9180a7f26b3196a 100644 (file)
@@ -1536,19 +1536,19 @@ MagickExport Image *KuwaharaImage(const Image *image,const double radius,
         {
           case 0:
           {
-            x_offset=x-((ssize_t) width/2L);
-            y_offset=y-((ssize_t) width/2L);
+            x_offset=x-((ssize_t) (width+1)/2L);
+            y_offset=y-((ssize_t) (width+1)/2L);
             break;
           }
           case 1:
           {
             x_offset=x;
-            y_offset=y-((ssize_t) width/2L);
+            y_offset=y-((ssize_t) (width+1)/2L);
             break;
           }
           case 2:
           {
-            x_offset=x-((ssize_t) width/2L);
+            x_offset=x-((ssize_t) (width+1)/2L);
             y_offset=y;
             break;
           }
@@ -1561,7 +1561,7 @@ MagickExport Image *KuwaharaImage(const Image *image,const double radius,
           }
         }
         p[i]=GetCacheViewVirtualPixels(image_view[i],x_offset,y_offset,
-          width/2L,width/2L,exception);
+          (width+1)/2,(width+1)/2,exception);
         if (p[i] == (const Quantum *) NULL)
           break;
       }