From a4a3658f96c593ae67d65c63bc5970bce5854920 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 19 Dec 2015 17:58:20 -0500 Subject: [PATCH] Only set alpha channel if the remove list is valid --- MagickCore/vision.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MagickCore/vision.c b/MagickCore/vision.c index aca2dc732..4b03364c2 100644 --- a/MagickCore/vision.c +++ b/MagickCore/vision.c @@ -581,9 +581,11 @@ MagickExport Image *ConnectedComponentsImage(const Image *image, if (last < 0) last+=(long) component_image->colors; } - component_image->alpha_trait=BlendPixelTrait; for (step=first > last ? -1 : 1; first != (last+step); first+=step) + { + component_image->alpha_trait=BlendPixelTrait; component_image->colormap[first].alpha=TransparentAlpha; + } } } (void) SyncImage(component_image,exception); -- 2.40.0