]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/list.c
Add RobidouxSharp filter depreciate Bessel Filter and Static Gravity
[imagemagick] / MagickCore / list.c
index c21dada32c4843ece8d6144d2b9f5bbff80a6fc6..4240b2414a72e13591281a7bcb13a360c2678a44 100644 (file)
@@ -371,7 +371,7 @@ MagickExport void DeleteImages(Image **images,const char *scenes,
   if (delete_list == (MagickBooleanType *) NULL)
     {
       (void) ThrowMagickException(exception,GetMagickModule(),
-        ResourceLimitError,"MemoryAllocationFailed","`%s'",(*images)->filename);
+        ResourceLimitError,"MemoryAllocationFailed","'%s'",(*images)->filename);
       return;
     }
   image=(*images);
@@ -599,10 +599,9 @@ MagickExport Image *GetImageFromList(const Image *images,const ssize_t index)
 
   /*
     Designed to efficiently find first image (index == 0), or last image
-    (index == -1) as appropriate, without to go through the whole image list,
-    unless the offset is outside of the list length range.
-
-    That is it tries to avoid 'counting the whole list' to handle the index.
+    (index == -1) as appropriate, without to go through the whole image list.
+    That is it tries to avoid 'counting the whole list' to  handle the
+    most common image indexes.
   */
   if ( index < 0 )
     {
@@ -843,7 +842,7 @@ MagickExport Image **ImageListToArray(const Image *images,
   if (group == (Image **) NULL)
     {
       (void) ThrowMagickException(exception,GetMagickModule(),
-        ResourceLimitError,"MemoryAllocationFailed","`%s'",images->filename);
+        ResourceLimitError,"MemoryAllocationFailed","'%s'",images->filename);
       return((Image **) NULL);
     }
   images=GetFirstImageInList(images);
@@ -947,9 +946,11 @@ MagickExport Image *NewImageList(void)
 MagickExport void PrependImageToList(Image **images,Image *prepend)
 {
   if (*images == (Image *) NULL)
-    *images = prepend;
-  else
-    AppendImageToList(&prepend,*images);
+    {
+      *images=prepend;
+      return;
+    }
+  AppendImageToList(&prepend,*images);
 }
 \f
 /*