]> granicus.if.org Git - imagemagick/commitdiff
minor layers composition bugfix
authoranthony <anthony@git.imagemagick.org>
Thu, 14 Apr 2011 02:57:12 +0000 (02:57 +0000)
committeranthony <anthony@git.imagemagick.org>
Thu, 14 Apr 2011 02:57:12 +0000 (02:57 +0000)
ChangeLog
magick/layer.c

index 7449756a5f13ea4a8b595756ba8de288c7027445..1e27feabd2ca1e234fb75b4bf1027cd482e2ceb5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-14  6.6.9-5 Anthony Thyssen <A.Thyssen@griffith...>
+  * Layers Composition Bug Fix, animations attributes of first image not
+    transfered in a single destination, multi-source image composition.
+
 2011-04-09  6.6.9-5 Anthony Thyssen <A.Thyssen@griffith...>
   * Add a special 'Voronoi' Distance method that will fill in holes using
     the nearest non-transparent edge pixel. This is experimental, and one
index 1cccc0192c0a130746e51a89c4430de2ce194ad7..d343fa4e6aeac4bea6e44eb2a04b8096c13eb1f9 100644 (file)
@@ -1852,6 +1852,11 @@ MagickExport void CompositeLayers(Image *destination,
 
     CompositeCanvas(destination, compose, source, x_offset, y_offset);
     /* copy source image attributes ? */
+    if ( source->next != (Image *) NULL )
+      {
+        destination->delay = source->delay;
+        destination->iterations = source->iterations;
+      }
     source=GetNextImageInList(source);
 
     while ( source != (Image *) NULL )
@@ -1987,10 +1992,10 @@ MagickExport Image *MergeImageLayers(Image *image,
              height += page.y-next->page.y;
              page.y = next->page.y;
         }
-        if ( (ssize_t) width < (next->page.x + next->columns - page.x) )
-           width = (size_t) next->page.x + next->columns - page.x;
-        if ( (ssize_t) height < (next->page.y + next->rows - page.y) )
-           height = (size_t) next->page.y + next->rows - page.y;
+        if ( (ssize_t) width < (next->page.x + (ssize_t)next->columns - page.x) )
+           width = (size_t) next->page.x + (ssize_t)next->columns - page.x;
+        if ( (ssize_t) height < (next->page.y + (ssize_t)next->rows - page.y) )
+           height = (size_t) next->page.y + (ssize_t)next->rows - page.y;
       }
       break;
     }
@@ -2014,9 +2019,9 @@ MagickExport Image *MergeImageLayers(Image *image,
         if (method == MosaicLayer) {
           page.x=next->page.x;
           page.y=next->page.y;
-          if ( (ssize_t) width < (next->page.x + next->columns) )
+          if ( (ssize_t) width < (next->page.x + (ssize_t)next->columns) )
              width = (size_t) next->page.x + next->columns;
-          if ( (ssize_t) height < (next->page.y + next->rows) )
+          if ( (ssize_t) height < (next->page.y + (ssize_t)next->rows) )
              height = (size_t) next->page.y + next->rows;
         }
       }