]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 4 Apr 2014 13:44:17 +0000 (13:44 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 4 Apr 2014 13:44:17 +0000 (13:44 +0000)
MagickCore/effect.c

index 2f77e33d7df5ff90d375b07961567872bb85b306..4c4b5ed52c0f0a50380087cef364ac59d0bc6f21 100644 (file)
@@ -933,18 +933,17 @@ static MagickBooleanType TraceEdge(Image *edge_image,CacheView *edge_view,
 
             for (u=(-1); u <= 1; u++)
             {
-              if (((y != 0) || (u != 0)) &&
-                  (IsAuthenticPixel(edge_image,x+u,y+v) != MagickFalse))
-                {
-                  (void) GetMatrixElement(pixel_cache,x+u,y+v,&pixel);
-                  if (pixel.intensity >= threshold)
-                    {
-                      status=TraceEdge(edge_image,edge_view,pixel_cache,x+u,y+v,
-                        threshold,exception);
-                      if (status != MagickFalse)
-                        return(MagickTrue);
-                    }
-                }
+              if ((u == 0) && (v == 0))
+                continue;
+              if (IsAuthenticPixel(edge_image,x+u,y+v) == MagickFalse)
+                continue;
+              (void) GetMatrixElement(pixel_cache,x+u,y+v,&pixel);
+              if (pixel.intensity < threshold)
+                continue;
+              status=TraceEdge(edge_image,edge_view,pixel_cache,x+u,y+v,
+                threshold,exception);
+              if (status != MagickFalse)
+                return(MagickTrue);
             }
           }
           return(MagickTrue);