]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/montage.c
(no commit message)
[imagemagick] / MagickCore / montage.c
index 0708cf727912b7a9119e25bc57a1ff6810f2d16a..c12117a8d06d26050f474b7b754348818fff9237 100644 (file)
@@ -496,9 +496,8 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
       */
       flags=GetGeometry(montage_info->geometry,&extract_info.x,&extract_info.y,
         &extract_info.width,&extract_info.height);
-      if ((extract_info.x == 0) && (extract_info.y == 0))
-        concatenate=((flags & RhoValue) == 0) && ((flags & SigmaValue) == 0) ?
-          MagickTrue : MagickFalse;
+      concatenate=((flags & RhoValue) == 0) && ((flags & SigmaValue) == 0) ?
+        MagickTrue : MagickFalse;
     }
   border_width=montage_info->border_width;
   bevel_width=0;
@@ -637,8 +636,8 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
     */
     (void) CopyMagickString(montage->filename,montage_info->filename,
       MaxTextExtent);
-    montage->columns=MagickMax(bounds.width,1);
-    montage->rows=MagickMax(bounds.height,1);
+    montage->columns=(size_t) MagickMax((ssize_t) bounds.width,1);
+    montage->rows=(size_t) MagickMax((ssize_t) bounds.height,1);
     (void) SetImageBackgroundColor(montage,exception);
     /*
       Set montage geometry.
@@ -760,9 +759,9 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
           if ((montage_info->frame != (char *) NULL) &&
               (image->compose == DstOutCompositeOp))
             {
-              SetPixelChannelMapMask(image,AlphaChannel);
+              SetPixelChannelMask(image,AlphaChannel);
               (void) NegateImage(image,MagickFalse,exception);
-              SetPixelChannelMapMask(image,DefaultChannels);
+              SetPixelChannelMask(image,DefaultChannels);
             }
         }
       /*
@@ -794,8 +793,8 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
           extract_info.height=height+2*frame_info.height;
           value=GetImageProperty(image,"label",exception);
           if (value != (const char *) NULL)
-            extract_info.height+=(size_t) ((metrics.ascent-
-              metrics.descent+4)*MultilineCensus(value));
+            extract_info.height+=(size_t) ((metrics.ascent-metrics.descent+4)*
+              MultilineCensus(value));
           frame_image=FrameImage(image,&extract_info,image->compose,exception);
           if (frame_image != (Image *) NULL)
             {
@@ -818,19 +817,19 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
               /*
                 Shadow image.
               */
-              (void) QueryColorCompliance("#00000000",AllCompliance,
+              (void) QueryColorCompliance("#0000",AllCompliance,
                 &image->background_color,exception);
-              shadow_image=ShadowImage(image,80.0,2.0,0.0,5,5,exception);
+              shadow_image=ShadowImage(image,80.0,2.0,5,5,exception);
               if (shadow_image != (Image *) NULL)
                 {
-                  (void) CompositeImage(shadow_image,OverCompositeOp,image,0,0,
-                    exception);
+                  (void) CompositeImage(shadow_image,image,OverCompositeOp,
+                    MagickTrue,0,0,exception);
                   image=DestroyImage(image);
                   image=shadow_image;
                 }
           }
-          (void) CompositeImage(montage,image->compose,image,x_offset+x,
-            y_offset+y,exception);
+          (void) CompositeImage(montage,image,image->compose,MagickTrue,
+            x_offset+x,y_offset+y,exception);
           value=GetImageProperty(image,"label",exception);
           if (value != (const char *) NULL)
             {
@@ -897,6 +896,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
   tile_image=DestroyImage(tile_image);
   if (texture != (Image *) NULL)
     texture=DestroyImage(texture);
+  title=DestroyString(title);
   master_list=(Image **) RelinquishMagickMemory(master_list);
   draw_info=DestroyDrawInfo(draw_info);
   clone_info=DestroyImageInfo(clone_info);