From: Cristy Date: Mon, 28 Dec 2015 13:47:22 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/68 X-Git-Tag: 7.0.1-0~398 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a38b4564f00511a8a7b260d6f3aa929263c91c32;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/68 --- diff --git a/MagickCore/image.c b/MagickCore/image.c index 9408110f9..a51b0573c 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -464,6 +464,7 @@ MagickExport Image *AppendImages(const Image *images, *next; size_t + depth, height, number_images, width; @@ -486,9 +487,12 @@ MagickExport Image *AppendImages(const Image *images, number_images=1; width=images->columns; height=images->rows; + depth=images->depth; next=GetNextImageInList(images); for ( ; next != (Image *) NULL; next=GetNextImageInList(next)) { + if (next->depth > depth) + depth=next->depth; if (next->alpha_trait != UndefinedPixelTrait) alpha_trait=BlendPixelTrait; number_images++; @@ -514,6 +518,7 @@ MagickExport Image *AppendImages(const Image *images, append_image=DestroyImage(append_image); return((Image *) NULL); } + append_image->depth=depth; append_image->alpha_trait=alpha_trait; (void) SetImageBackgroundColor(append_image,exception); status=MagickTrue;