]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/68
authorCristy <urban-warrior@imagemagick.org>
Mon, 28 Dec 2015 13:47:22 +0000 (08:47 -0500)
committerCristy <urban-warrior@imagemagick.org>
Mon, 28 Dec 2015 13:47:22 +0000 (08:47 -0500)
MagickCore/image.c

index 9408110f94d83edd926609e996bda7c031bcf6e6..a51b0573c3ec2ce1974e14da275b38a32f80a794 100644 (file)
@@ -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;