]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 18 May 2014 11:53:43 +0000 (11:53 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 18 May 2014 11:53:43 +0000 (11:53 +0000)
MagickCore/feature.c

index e7e64cfddc88bced60099a5ffcd1acd439dd5a18..1b79ecb587807e6a410bbdc4b277645cbec57425 100644 (file)
 %  CannyEdgeImage() uses a multi-stage algorithm to detect a wide range of
 %  edges in images.
 %
-%  The format of the EdgeImage method is:
+%  The format of the CannyEdgeImage method is:
 %
 %      Image *CannyEdgeImage(const Image *image,const double radius,
 %        const double sigma,const double lower_percent,
@@ -1918,10 +1918,12 @@ MagickExport Image *HoughLineImage(const Image *image,const size_t width,
   (void) FormatLocaleString(message,MaxTextExtent,
     "# Hough line transform: %.20gx%.20g%+.20g\n",(double) width,
     (double) height,(double) threshold);
-  (void) write(file,message,strlen(message));
+  if (write(file,message,strlen(message)) != strlen(message))
+    status=MagickFalse;
   (void) FormatLocaleString(message,MaxTextExtent,"viewbox 0 0 %.20g %.20g\n",
     (double) image->columns,(double) image->rows);
-  (void) write(file,message,strlen(message));
+  if (write(file,message,strlen(message)) != strlen(message))
+    status=MagickFalse;
   line_count=image->columns > image->rows ? image->columns/4 : image->rows/4;
   if (threshold != 0)
     line_count=threshold;
@@ -2004,7 +2006,8 @@ MagickExport Image *HoughLineImage(const Image *image,const size_t width,
             }
           (void) FormatLocaleString(message,MaxTextExtent,
             "line %g,%g %g,%g  # %g\n",line.x1,line.y1,line.x2,line.y2,maxima);
-          (void) write(file,message,strlen(message));
+          if (write(file,message,strlen(message)) != strlen(message))
+            status=MagickFalse;
         }
     }
   }