]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 12 Apr 2014 01:16:12 +0000 (01:16 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 12 Apr 2014 01:16:12 +0000 (01:16 +0000)
MagickCore/effect.c

index 87b225ce49c7c5933d474a9f8300132e97ebaedc..176b4631811d314fe5409b245e0f9faa1e2ae4d0 100644 (file)
@@ -964,8 +964,8 @@ static MagickBooleanType TraceEdges(Image *edge_image,CacheView *trace_view,
         status=GetMatrixElement(pixel_cache,edge.x+u,edge.y+v,&pixel);
         if (status == MagickFalse)
           return(MagickFalse);
-        if ((pixel.intensity >= lower_threshold) &&
-            (GetPixelIntensity(edge_image,q) == 0))
+        if ((GetPixelIntensity(edge_image,q) == 0.0) &&
+            (pixel.intensity >= lower_threshold))
           {
             *q=QuantumRange;
             status=SyncCacheViewAuthenticPixels(trace_view,exception);
@@ -1302,8 +1302,8 @@ MagickExport Image *CannyEdgeImage(const Image *image,const double radius,
           status=MagickFalse;
           continue;
         }
-      if ((pixel.intensity >= upper_threshold) &&
-          (GetPixelIntensity(edge_image,q) == 0))
+      if ((GetPixelIntensity(edge_image,q) == 0.0) &&
+          (pixel.intensity >= upper_threshold))
         {
           *q=QuantumRange;
           status=SyncCacheViewAuthenticPixels(edge_view,exception);