]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sun, 15 Jan 2017 00:20:37 +0000 (19:20 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 15 Jan 2017 00:20:37 +0000 (19:20 -0500)
MagickCore/vision.c

index 6c4d58d3aff6b5cdd614e9c4313aff3f8dd021d7..53ebd5b7412b8277ce431aac45ae62add191fe8c 100644 (file)
@@ -388,11 +388,11 @@ MagickExport Image *ConnectedComponentsImage(const Image *image,
         }
       if (x < object[id].bounding_box.x)
         object[id].bounding_box.x=x;
-      if (x > (ssize_t) object[id].bounding_box.width)
+      if (x >= (ssize_t) object[id].bounding_box.width)
         object[id].bounding_box.width=(size_t) x;
       if (y < object[id].bounding_box.y)
         object[id].bounding_box.y=y;
-      if (y > (ssize_t) object[id].bounding_box.height)
+      if (y >= (ssize_t) object[id].bounding_box.height)
         object[id].bounding_box.height=(size_t) y;
       object[id].color.red+=GetPixelRed(image,p);
       object[id].color.green+=GetPixelGreen(image,p);