]> granicus.if.org Git - imagemagick/blobdiff - coders/msl.c
...
[imagemagick] / coders / msl.c
index 16fa26b8f335799d9f95aa7102837df822545d70..92d61e26dcd5e8b93847f7378d4038cd3c1652a4 100644 (file)
@@ -19,7 +19,7 @@
 %                               December 2001                                 %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -94,9 +94,7 @@
 #include "MagickCore/utility.h"
 #if defined(MAGICKCORE_XML_DELEGATE)
 #  if defined(MAGICKCORE_WINDOWS_SUPPORT)
-#    if defined(__MINGW32__) || defined(__MINGW64__)
-#      define _MSC_VER
-#    else
+#    if !defined(__MINGW32__) && !defined(__MINGW64__)
 #      include <win32config.h>
 #    endif
 #  endif
@@ -204,7 +202,7 @@ static inline Image *GetImageCache(const ImageInfo *image_info,const char *path,
   ExceptionInfo *exception)
 {
   char
-    key[MaxTextExtent];
+    key[MagickPathExtent];
 
   ExceptionInfo
     *sans_exception;
@@ -215,14 +213,14 @@ static inline Image *GetImageCache(const ImageInfo *image_info,const char *path,
   ImageInfo
     *read_info;
 
-  (void) FormatLocaleString(key,MaxTextExtent,"cache:%s",path);
+  (void) FormatLocaleString(key,MagickPathExtent,"cache:%s",path);
   sans_exception=AcquireExceptionInfo();
   image=(Image *) GetImageRegistry(ImageRegistryType,key,sans_exception);
   sans_exception=DestroyExceptionInfo(sans_exception);
   if (image != (Image *) NULL)
     return(image);
   read_info=CloneImageInfo(image_info);
-  (void) CopyMagickString(read_info->filename,path,MaxTextExtent);
+  (void) CopyMagickString(read_info->filename,path,MagickPathExtent);
   image=ReadImage(read_info,exception);
   read_info=DestroyImageInfo(read_info);
   if (image != (Image *) NULL)
@@ -567,10 +565,10 @@ static void MSLPushImage(MSLInfo *msl_info,Image *image)
   msl_info->image=(Image **) ResizeQuantumMemory(msl_info->image,(n+1),
     sizeof(*msl_info->image));
   if ((msl_info->image_info == (ImageInfo **) NULL) ||
-    (msl_info->draw_info == (DrawInfo **) NULL) ||
-    (msl_info->attributes == (Image **) NULL) ||
-    (msl_info->image == (Image **) NULL))
-      ThrowMSLException(ResourceLimitFatalError,"MemoryAllocationFailed","msl");
+      (msl_info->draw_info == (DrawInfo **) NULL) ||
+      (msl_info->attributes == (Image **) NULL) ||
+      (msl_info->image == (Image **) NULL))
+    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed")
   msl_info->image_info[n]=CloneImageInfo(msl_info->image_info[n-1]);
   msl_info->draw_info[n]=CloneDrawInfo(msl_info->image_info[n-1],
     msl_info->draw_info[n-1]);
@@ -582,8 +580,8 @@ static void MSLPushImage(MSLInfo *msl_info,Image *image)
       msl_info->exception);
   msl_info->image[n]=(Image *) image;
   if ((msl_info->image_info[n] == (ImageInfo *) NULL) ||
-    (msl_info->attributes[n] == (Image *) NULL))
-    ThrowMSLException(ResourceLimitFatalError,"MemoryAllocationFailed","msl");
+      (msl_info->attributes[n] == (Image *) NULL))
+    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed")
   if (msl_info->number_groups != 0)
     msl_info->group_info[msl_info->number_groups-1].numImages++;
 }
@@ -615,7 +613,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
     channel_mask;
 
   char
-    key[MaxTextExtent],
+    key[MagickPathExtent],
     *value;
 
   const char
@@ -629,7 +627,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
     *draw_info;
 
   ExceptionInfo
-    exception;
+    *exception;
 
   GeometryInfo
     geometry_info;
@@ -665,7 +663,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
   */
   (void) LogMagickEvent(CoderEvent,GetMagickModule(),
     "  SAX.startElement(%s",tag);
-  GetExceptionInfo(&exception);
+  exception=AcquireExceptionInfo();
   msl_info=(MSLInfo *) context;
   n=msl_info->n;
   keyword=(const char *) NULL;
@@ -702,7 +700,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -760,7 +758,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       if (LocaleCompare((const char *) tag,"annotate") == 0)
         {
           char
-            text[MaxTextExtent];
+            text[MagickPathExtent];
 
           /*
             Annotate image.
@@ -782,7 +780,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -868,7 +866,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->fill,&exception);
+                        &draw_info->fill,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"family") == 0)
@@ -891,7 +889,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParseGravityGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"gravity") == 0)
@@ -975,7 +973,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "stroke") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->stroke,&exception);
+                        &draw_info->stroke,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
@@ -1024,7 +1022,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "undercolor") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->undercolor,&exception);
+                        &draw_info->undercolor,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1075,7 +1073,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) FormatLocaleString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MagickPathExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
             geometry.height,(double) geometry.x,(double) geometry.y);
           CloneString(&draw_info->geometry,text);
@@ -1113,7 +1111,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1176,7 +1174,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1273,7 +1271,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1300,7 +1298,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &msl_info->image[n]->border_color,&exception);
+                        &msl_info->image[n]->border_color,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1313,7 +1311,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       break;
@@ -1370,7 +1368,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       if (LocaleCompare((const char *) tag,"colorize") == 0)
         {
           char
-            blend[MaxTextExtent];
+            blend[MagickPathExtent];
 
           Image
             *colorize_image;
@@ -1388,14 +1386,14 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               break;
             }
           GetPixelInfo(msl_info->image[n],&target);
-          (void) CopyMagickString(blend,"100",MaxTextExtent);
+          (void) CopyMagickString(blend,"100",MagickPathExtent);
           if (attributes != (const xmlChar **) NULL)
             for (i=0; (attributes[i] != (const xmlChar *) NULL); i++)
             {
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1404,7 +1402,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"blend") == 0)
                     {
-                      (void) CopyMagickString(blend,value,MaxTextExtent);
+                      (void) CopyMagickString(blend,value,MagickPathExtent);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1461,7 +1459,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
           keyword=(const char *) attributes[i++];
           CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-            msl_info->attributes[n],(const char *) attributes[i],&exception));
+            msl_info->attributes[n],(const char *) attributes[i],exception));
           switch (*keyword)
           {
             case 'R':
@@ -1532,7 +1530,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1542,7 +1540,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       break;
@@ -1642,7 +1640,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1652,7 +1650,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"bordercolor") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &target,&exception);
+                        &target,exception);
                       paint_method=FillToBorderMethod;
                       break;
                     }
@@ -1666,7 +1664,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->fill,&exception);
+                        &draw_info->fill,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
@@ -1685,12 +1683,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       (void) GetOneVirtualPixelInfo(msl_info->image[n],
                         TileVirtualPixelMethod,geometry.x,geometry.y,&target,
-                        &exception);
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1705,7 +1703,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       geometry.x=StringToLong(value);
                       (void) GetOneVirtualPixelInfo(msl_info->image[n],
                         TileVirtualPixelMethod,geometry.x,geometry.y,&target,
-                        &exception);
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1720,7 +1718,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       geometry.y=StringToLong(value);
                       (void) GetOneVirtualPixelInfo(msl_info->image[n],
                         TileVirtualPixelMethod,geometry.x,geometry.y,&target,
-                        &exception);
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1746,7 +1744,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       if (LocaleCompare((const char *) tag,"composite") == 0)
         {
           char
-            composite_geometry[MaxTextExtent];
+            composite_geometry[MagickPathExtent];
 
           CompositeOperator
             compose;
@@ -1772,7 +1770,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1801,12 +1799,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *attribute;
 
                       attribute=GetImageProperty(msl_info->attributes[j],"id",
-                        &exception);
+                        exception);
                       if ((attribute != (const char *) NULL)  &&
                           (LocaleCompare(attribute,value) == 0))
                         {
                           composite_image=CloneImage(msl_info->image[j],0,0,
-                            MagickFalse,&exception);
+                            MagickFalse,exception);
                           break;
                         }
                     }
@@ -1826,7 +1824,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1858,7 +1856,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "color") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &composite_image->background_color,&exception);
+                        &composite_image->background_color,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"compose") == 0)
@@ -1873,7 +1871,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       break;
@@ -1911,15 +1909,15 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *attribute;
 
                       attribute=GetImageProperty(msl_info->attributes[j],"id",
-                        &exception);
+                        exception);
                       if ((attribute != (const char *) NULL)  &&
                           (LocaleCompare(value,value) == 0))
                         {
-                          SetImageType(composite_image,TrueColorMatteType,
-                            &exception);
+                          SetImageType(composite_image,TrueColorAlphaType,
+                            exception);
                           (void) CompositeImage(composite_image,
                             msl_info->image[j],CopyAlphaCompositeOp,MagickTrue,
-                            0,0,&exception);
+                            0,0,exception);
                           break;
                         }
                     }
@@ -1949,19 +1947,19 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       if (compose != DissolveCompositeOp)
                         {
                           (void) SetImageAlpha(composite_image,(Quantum)
-                            opacity,&exception);
+                            opacity,exception);
                           break;
                         }
                       (void) SetImageArtifact(msl_info->image[n],
                                             "compose:args",value);
                       if (composite_image->alpha_trait == UndefinedPixelTrait)
                         (void) SetImageAlpha(composite_image,OpaqueAlpha,
-                          &exception);
-                      composite_view=AcquireAuthenticCacheView(composite_image,&exception);
+                          exception);
+                      composite_view=AcquireAuthenticCacheView(composite_image,exception);
                       for (y=0; y < (ssize_t) composite_image->rows ; y++)
                       {
                         q=GetCacheViewAuthenticPixels(composite_view,0,y,
-                          (ssize_t) composite_image->columns,1,&exception);
+                          (ssize_t) composite_image->columns,1,exception);
                         for (x=0; x < (ssize_t) composite_image->columns; x++)
                         {
                           if (GetPixelAlpha(composite_image,q) == OpaqueAlpha)
@@ -1969,7 +1967,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                               ClampToQuantum(opacity),q);
                           q+=GetPixelChannels(composite_image);
                         }
-                        if (SyncCacheViewAuthenticPixels(composite_view,&exception) == MagickFalse)
+                        if (SyncCacheViewAuthenticPixels(composite_view,exception) == MagickFalse)
                           break;
                       }
                       composite_view=DestroyCacheView(composite_view);
@@ -1985,7 +1983,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
                       rotate_image=RotateImage(composite_image,
-                        StringToDouble(value,(char **) NULL),&exception);
+                        StringToDouble(value,(char **) NULL),exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2021,10 +2019,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                          {
                            if (rotate_image != (Image *) NULL)
                              (void) CompositeImage(image,rotate_image,compose,
-                               MagickTrue,x,y,&exception);
+                               MagickTrue,x,y,exception);
                            else
                              (void) CompositeImage(image,composite_image,
-                               compose,MagickTrue,x,y,&exception);
+                               compose,MagickTrue,x,y,exception);
                          }
                       if (rotate_image != (Image *) NULL)
                         rotate_image=DestroyImage(rotate_image);
@@ -2067,16 +2065,16 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           image=msl_info->image[n];
-          (void) FormatLocaleString(composite_geometry,MaxTextExtent,
+          (void) FormatLocaleString(composite_geometry,MagickPathExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) composite_image->columns,
             (double) composite_image->rows,(double) geometry.x,(double)
             geometry.y);
           flags=ParseGravityGeometry(image,composite_geometry,&geometry,
-            &exception);
+            exception);
           channel_mask=SetImageChannelMask(image,channel);
           if (rotate_image == (Image *) NULL)
             CompositeImage(image,composite_image,compose,MagickTrue,geometry.x,
-              geometry.y,&exception);
+              geometry.y,exception);
           else
             {
               /*
@@ -2087,7 +2085,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               geometry.y-=(ssize_t) (rotate_image->rows-
                 composite_image->rows)/2;
               CompositeImage(image,rotate_image,compose,MagickTrue,geometry.x,
-                geometry.y,&exception);
+                geometry.y,exception);
               rotate_image=DestroyImage(rotate_image);
             }
           (void) SetImageChannelMask(image,channel_mask);
@@ -2115,7 +2113,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2169,7 +2167,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2179,7 +2177,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParseGravityGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2271,7 +2269,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2295,7 +2293,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) CycleColormapImage(msl_info->image[n],display,&exception);
+          (void) CycleColormapImage(msl_info->image[n],display,exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
@@ -2323,7 +2321,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
@@ -2349,7 +2347,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2368,7 +2366,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       if (LocaleCompare((const char *) tag,"draw") == 0)
         {
           char
-            text[MaxTextExtent];
+            text[MagickPathExtent];
 
           /*
             Annotate image.
@@ -2390,7 +2388,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2476,7 +2474,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->fill,&exception);
+                        &draw_info->fill,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"family") == 0)
@@ -2499,7 +2497,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       break;
@@ -2534,6 +2532,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                           (void) ConcatenateString(&draw_info->primitive," ");
                           ConcatenateString(&draw_info->primitive,value);
                         }
+                      break;
                     }
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
@@ -2603,7 +2602,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "stroke") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->stroke,&exception);
+                        &draw_info->stroke,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
@@ -2630,7 +2629,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"text") == 0)
                     {
-                      CloneString(&draw_info->text,value);
+                      (void) ConcatenateString(&draw_info->primitive," '");
+                      (void) ConcatenateString(&draw_info->primitive,value);
+                      (void) ConcatenateString(&draw_info->primitive,"'");
                       break;
                     }
                   if (LocaleCompare(keyword,"translate") == 0)
@@ -2652,7 +2653,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "undercolor") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->undercolor,&exception);
+                        &draw_info->undercolor,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2703,7 +2704,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) FormatLocaleString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MagickPathExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
             geometry.height,(double) geometry.x,(double) geometry.y);
           CloneString(&draw_info->geometry,text);
@@ -2715,7 +2716,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             affine.tx;
           draw_info->affine.ty=affine.rx*current.tx+affine.sy*current.ty+
             affine.ty;
-          (void) DrawImage(msl_info->image[n],draw_info,&exception);
+          (void) DrawImage(msl_info->image[n],draw_info,exception);
           draw_info=DestroyDrawInfo(draw_info);
           break;
         }
@@ -2744,7 +2745,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2810,7 +2811,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2889,7 +2890,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
@@ -2918,7 +2919,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2984,7 +2985,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
@@ -3016,7 +3017,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
@@ -3045,6 +3046,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 (const char *) tag);
               break;
             }
+          (void) ResetMagickMemory(&frame_info,0,sizeof(frame_info));
           SetGeometry(msl_info->image[n],&geometry);
           if (attributes != (const xmlChar **) NULL)
             for (i=0; (attributes[i] != (const xmlChar *) NULL); i++)
@@ -3052,7 +3054,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3079,7 +3081,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &msl_info->image[n]->matte_color,&exception);
+                        &msl_info->image[n]->alpha_color,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3092,7 +3094,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       frame_info.width=geometry.width;
@@ -3181,7 +3183,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       if (LocaleCompare((const char *) tag,"gamma") == 0)
         {
           char
-            gamma[MaxTextExtent];
+            gamma[MagickPathExtent];
 
           PixelInfo
             pixel;
@@ -3206,7 +3208,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3243,7 +3245,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"gamma") == 0)
                     {
-                      (void) CopyMagickString(gamma,value,MaxTextExtent);
+                      (void) CopyMagickString(gamma,value,MagickPathExtent);
                       break;
                     }
                   if (LocaleCompare(keyword,"green") == 0)
@@ -3276,9 +3278,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           if (*gamma == '\0')
-            (void) FormatLocaleString(gamma,MaxTextExtent,"%g,%g,%g",
+            (void) FormatLocaleString(gamma,MagickPathExtent,"%g,%g,%g",
               (double) pixel.red,(double) pixel.green,(double) pixel.blue);
-          (void) GammaImage(msl_info->image[n],atof(gamma),
+          (void) GammaImage(msl_info->image[n],strtod(gamma,(char **) NULL),
             msl_info->exception);
           break;
         }
@@ -3296,7 +3298,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             keyword=(const char *) attributes[i++];
             CloneString(&value,(const char *) attributes[i]);
-            (void) CopyMagickString(key,value,MaxTextExtent);
+            (void) CopyMagickString(key,value,MagickPathExtent);
             switch (*keyword)
             {
               case 'H':
@@ -3304,10 +3306,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               {
                 if (LocaleCompare(keyword,"height") == 0)
                   {
-                    (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
+                    (void) FormatLocaleString(value,MagickPathExtent,"%.20g",
                       (double) msl_info->image[n]->rows);
                     (void) SetImageProperty(msl_info->attributes[n],key,value,
-                      &exception);
+                      exception);
                     break;
                   }
                 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3317,10 +3319,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               {
                 if (LocaleCompare(keyword,"width") == 0)
                   {
-                    (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
+                    (void) FormatLocaleString(value,MagickPathExtent,"%.20g",
                       (double) msl_info->image[n]->columns);
                     (void) SetImageProperty(msl_info->attributes[n],key,value,
-                      &exception);
+                      exception);
                     break;
                   }
                 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3356,7 +3358,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             keyword=(const char *) attributes[i++];
             CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-              msl_info->attributes[n],(const char *) attributes[i],&exception));
+              msl_info->attributes[n],(const char *) attributes[i],exception));
             switch (*keyword)
             {
               case 'C':
@@ -3368,11 +3370,11 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       *next_image;
 
                     (void) CopyMagickString(msl_info->image_info[n]->filename,
-                      "xc:",MaxTextExtent);
+                      "xc:",MagickPathExtent);
                     (void) ConcatenateMagickString(msl_info->image_info[n]->
-                      filename,value,MaxTextExtent);
-                    next_image=ReadImage(msl_info->image_info[n],&exception);
-                    CatchException(&exception);
+                      filename,value,MagickPathExtent);
+                    next_image=ReadImage(msl_info->image_info[n],exception);
+                    CatchException(exception);
                     if (next_image == (Image *) NULL)
                       continue;
                     if (msl_info->image[n] == (Image *) NULL)
@@ -3425,7 +3427,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3496,7 +3498,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
           keyword=(const char *) attributes[i++];
           CloneString(&value,(const char *) attributes[i]);
-          (void) CopyMagickString(key,value,MaxTextExtent);
+          (void) CopyMagickString(key,value,MagickPathExtent);
           switch (*keyword)
           {
             case 'B':
@@ -3569,7 +3571,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
@@ -3609,7 +3611,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3640,12 +3642,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *attribute;
 
                       attribute=GetImageProperty(msl_info->attributes[j],"id",
-                        &exception);
+                        exception);
                       if ((attribute != (const char *) NULL)  &&
                           (LocaleCompare(attribute,value) == 0))
                         {
                           affinity_image=CloneImage(msl_info->image[j],0,0,
-                            MagickFalse,&exception);
+                            MagickFalse,exception);
                           break;
                         }
                     }
@@ -3663,7 +3665,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           quantize_info->dither_method=dither != MagickFalse ?
             RiemersmaDitherMethod : NoDitherMethod;
           (void) RemapImages(quantize_info,msl_info->image[n],
-            affinity_image,&exception);
+            affinity_image,exception);
           quantize_info=DestroyQuantizeInfo(quantize_info);
           affinity_image=DestroyImage(affinity_image);
           break;
@@ -3697,7 +3699,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3707,7 +3709,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"bordercolor") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &target,&exception);
+                        &target,exception);
                       paint_method=FillToBorderMethod;
                       break;
                     }
@@ -3734,12 +3736,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       (void) GetOneVirtualPixelInfo(msl_info->image[n],
                         TileVirtualPixelMethod,geometry.x,geometry.y,&target,
-                        &exception);
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3766,7 +3768,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       geometry.x=StringToLong(value);
                       (void) GetOneVirtualPixelInfo(msl_info->image[n],
                         TileVirtualPixelMethod,geometry.x,geometry.y,&target,
-                        &exception);
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3781,7 +3783,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       geometry.y=StringToLong(value);
                       (void) GetOneVirtualPixelInfo(msl_info->image[n],
                         TileVirtualPixelMethod,geometry.x,geometry.y,&target,
-                        &exception);
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3827,7 +3829,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3895,7 +3897,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
@@ -3912,7 +3914,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       if (LocaleCompare((const char *) tag,"modulate") == 0)
         {
           char
-            modulate[MaxTextExtent];
+            modulate[MagickPathExtent];
 
           /*
             Modulate image.
@@ -3932,7 +3934,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4027,7 +4029,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) FormatLocaleString(modulate,MaxTextExtent,"%g,%g,%g",
+          (void) FormatLocaleString(modulate,MagickPathExtent,"%g,%g,%g",
             geometry_info.rho,geometry_info.sigma,geometry_info.xi);
           (void) ModulateImage(msl_info->image[n],modulate,
             msl_info->exception);
@@ -4059,7 +4061,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4127,7 +4129,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4184,7 +4186,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4247,16 +4249,16 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               break;
             }
           (void) QueryColorCompliance("none",AllCompliance,&target,
-            &exception);
+            exception);
           (void) QueryColorCompliance("none",AllCompliance,&fill_color,
-            &exception);
+            exception);
           if (attributes != (const xmlChar **) NULL)
             for (i=0; (attributes[i] != (const xmlChar *) NULL); i++)
             {
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4282,7 +4284,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &fill_color,&exception);
+                        &fill_color,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
@@ -4323,7 +4325,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             keyword=(const char *) attributes[i++];
             attribute=InterpretImageProperties(msl_info->image_info[n],
               msl_info->attributes[n],(const char *) attributes[i],
-              &exception);
+              exception);
             CloneString(&value,attribute);
             switch (*keyword)
             {
@@ -4374,7 +4376,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               if (*keyword == '!')
                 {
@@ -4382,7 +4384,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     Remove a profile from the image.
                   */
                   (void) ProfileImage(msl_info->image[n],keyword,
-                    (const unsigned char *) NULL,0,&exception);
+                    (const unsigned char *) NULL,0,exception);
                   continue;
                 }
               /*
@@ -4392,13 +4394,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               profile=GetImageProfile(msl_info->image[n],"iptc");
               if (profile != (StringInfo *) NULL)
                 profile_info->profile=(void *) CloneStringInfo(profile);
-              profile_image=GetImageCache(profile_info,keyword,&exception);
+              profile_image=GetImageCache(profile_info,keyword,exception);
               profile_info=DestroyImageInfo(profile_info);
               if (profile_image == (Image *) NULL)
                 {
                   char
-                    name[MaxTextExtent],
-                    filename[MaxTextExtent];
+                    name[MagickPathExtent],
+                    filename[MagickPathExtent];
 
                   register char
                     *p;
@@ -4406,8 +4408,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   StringInfo
                     *profile;
 
-                  (void) CopyMagickString(filename,keyword,MaxTextExtent);
-                  (void) CopyMagickString(name,keyword,MaxTextExtent);
+                  (void) CopyMagickString(filename,keyword,MagickPathExtent);
+                  (void) CopyMagickString(name,keyword,MagickPathExtent);
                   for (p=filename; *p != '\0'; p++)
                     if ((*p == ':') && (IsPathDirectory(keyword) < 0) &&
                         (IsPathAccessible(keyword) == MagickFalse))
@@ -4424,12 +4426,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                           *q=(*++p);
                         break;
                       }
-                  profile=FileToStringInfo(filename,~0UL,&exception);
+                  profile=FileToStringInfo(filename,~0UL,exception);
                   if (profile != (StringInfo *) NULL)
                     {
                       (void) ProfileImage(msl_info->image[n],name,
                         GetStringInfoDatum(profile),(size_t)
-                        GetStringInfoLength(profile),&exception);
+                        GetStringInfoLength(profile),exception);
                       profile=DestroyStringInfo(profile);
                     }
                   continue;
@@ -4442,7 +4444,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 if (profile != (StringInfo *) NULL)
                   (void) ProfileImage(msl_info->image[n],name,
                     GetStringInfoDatum(profile),(size_t)
-                    GetStringInfoLength(profile),&exception);
+                    GetStringInfoLength(profile),exception);
                 name=GetNextImageProfile(profile_image);
               }
               profile_image=DestroyImage(profile_image);
@@ -4475,7 +4477,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4555,13 +4557,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) QuantizeImage(&quantize_info,msl_info->image[n],&exception);
+          (void) QuantizeImage(&quantize_info,msl_info->image[n],exception);
           break;
         }
       if (LocaleCompare((const char *) tag,"query-font-metrics") == 0)
         {
           char
-            text[MaxTextExtent];
+            text[MagickPathExtent];
 
           MagickBooleanType
             status;
@@ -4583,7 +4585,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4669,7 +4671,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->fill,&exception);
+                        &draw_info->fill,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"family") == 0)
@@ -4692,7 +4694,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       break;
@@ -4777,7 +4779,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "stroke") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->stroke,&exception);
+                        &draw_info->stroke,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
@@ -4826,7 +4828,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "undercolor") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &draw_info->undercolor,&exception);
+                        &draw_info->undercolor,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4877,7 +4879,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) FormatLocaleString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MagickPathExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
             geometry.height,(double) geometry.x,(double) geometry.y);
           CloneString(&draw_info->geometry,text);
@@ -4954,7 +4956,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4964,7 +4966,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       break;
@@ -5034,7 +5036,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             keyword=(const char *) attributes[i++];
             CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-              msl_info->attributes[n],(const char *) attributes[i],&exception));
+              msl_info->attributes[n],(const char *) attributes[i],exception));
             switch (*keyword)
             {
               case 'F':
@@ -5045,10 +5047,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     Image
                       *image;
 
+                    if (value == (char *) NULL)
+                      break;
                     (void) CopyMagickString(msl_info->image_info[n]->filename,
-                      value,MaxTextExtent);
-                    image=ReadImage(msl_info->image_info[n],&exception);
-                    CatchException(&exception);
+                      value,MagickPathExtent);
+                    image=ReadImage(msl_info->image_info[n],exception);
+                    CatchException(exception);
                     if (image == (Image *) NULL)
                       continue;
                     AppendImageToList(&msl_info->image[n],image);
@@ -5086,7 +5090,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5154,7 +5158,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
         keyword=(const char *) attributes[i++];
         CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-          msl_info->attributes[n],(const char *) attributes[i],&exception));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'G':
@@ -5281,7 +5285,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       {
         keyword=(const char *) attributes[i++];
         CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-          msl_info->attributes[n],(const char *) attributes[i],&exception));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'G':
@@ -5361,7 +5365,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
     }
       if (LocaleCompare((const char *) tag,"resize") == 0)
         {
-          FilterTypes
+          FilterType
             filter;
 
           Image
@@ -5383,7 +5387,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5397,7 +5401,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       if (option < 0)
                         ThrowMSLException(OptionError,"UnrecognizedNoiseType",
                           value);
-                      filter=(FilterTypes) option;
+                      filter=(FilterType) option;
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5410,7 +5414,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParseRegionGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5478,7 +5482,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5488,7 +5492,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParsePageGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       if ((flags & HeightValue) == 0)
                         geometry.height=geometry.width;
                       break;
@@ -5556,7 +5560,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
         keyword=(const char *) attributes[i++];
         CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-          msl_info->attributes[n],(const char *) attributes[i],&exception));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'G':
@@ -5636,7 +5640,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5700,7 +5704,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
         keyword=(const char *) attributes[i++];
         CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-          msl_info->attributes[n],(const char *) attributes[i],&exception));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'D':
@@ -5763,7 +5767,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5773,7 +5777,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParseRegionGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5840,7 +5844,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5850,7 +5854,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"geometry") == 0)
                     {
                       flags=ParseRegionGeometry(msl_info->image[n],value,
-                        &geometry,&exception);
+                        &geometry,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5924,7 +5928,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5987,7 +5991,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           (void) SegmentImage(msl_info->image[n],colorspace,verbose,
-            geometry_info.rho,geometry_info.sigma,&exception);
+            geometry_info.rho,geometry_info.sigma,exception);
           break;
         }
       else if (LocaleCompare((const char *) tag, "set") == 0)
@@ -6004,7 +6008,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
           keyword=(const char *) attributes[i++];
           CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-            msl_info->attributes[n],(const char *) attributes[i],&exception));
+            msl_info->attributes[n],(const char *) attributes[i],exception));
           switch (*keyword)
           {
             case 'C':
@@ -6018,11 +6022,11 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       *property;
 
                     property=GetImageProperty(msl_info->attributes[j],"id",
-                      &exception);
+                      exception);
                     if (LocaleCompare(property,value) == 0)
                       {
-                        SetImageMask(msl_info->image[n],msl_info->image[j],
-                          &exception);
+                        SetImageMask(msl_info->image[n],ReadPixelMask,
+                          msl_info->image[j],exception);
                         break;
                       }
                   }
@@ -6036,11 +6040,11 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       *property;
 
                     property=GetImageProperty(msl_info->attributes[j],"id",
-                      &exception);
+                      exception);
                     if (LocaleCompare(property,value) == 0)
                       {
-                        SetImageMask(msl_info->image[n],msl_info->image[j],
-                          &exception);
+                        SetImageMask(msl_info->image[n],ReadPixelMask,
+                          msl_info->image[j],exception);
                         break;
                       }
                   }
@@ -6057,12 +6061,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     ThrowMSLException(OptionError,"UnrecognizedColorspace",
                       value);
                   (void) TransformImageColorspace(msl_info->image[n],
-                    (ColorspaceType) colorspace,&exception);
+                    (ColorspaceType) colorspace,exception);
                   break;
                 }
               (void) SetMSLAttributes(msl_info,keyword,value);
               (void) SetImageProperty(msl_info->image[n],keyword,value,
-                &exception);
+                exception);
               break;
             }
             case 'D':
@@ -6080,7 +6084,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               (void) SetMSLAttributes(msl_info,keyword,value);
               (void) SetImageProperty(msl_info->image[n],keyword,value,
-                &exception);
+                exception);
               break;
             }
             case 'O':
@@ -6099,7 +6103,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   } else
                     opac = StringToLong( value );
                   (void) SetImageAlpha( msl_info->image[n], (Quantum) opac,
-                    &exception);
+                    exception);
                   break;
               }
               (void) SetMSLAttributes(msl_info,keyword,value);
@@ -6113,7 +6117,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               if (LocaleCompare(keyword, "page") == 0)
               {
                 char
-                  page[MaxTextExtent];
+                  page[MagickPathExtent];
 
                 const char
                   *image_option;
@@ -6129,10 +6133,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 if (image_option != (const char *) NULL)
                   flags=ParseAbsoluteGeometry(image_option,&geometry);
                 flags=ParseAbsoluteGeometry(value,&geometry);
-                (void) FormatLocaleString(page,MaxTextExtent,"%.20gx%.20g",
+                (void) FormatLocaleString(page,MagickPathExtent,"%.20gx%.20g",
                   (double) geometry.width,(double) geometry.height);
                 if (((flags & XValue) != 0) || ((flags & YValue) != 0))
-                  (void) FormatLocaleString(page,MaxTextExtent,
+                  (void) FormatLocaleString(page,MagickPathExtent,
                     "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,
                     (double) geometry.height,(double) geometry.x,(double)
                     geometry.y);
@@ -6180,7 +6184,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6270,7 +6274,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6373,7 +6377,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
           keyword=(const char *) attributes[i++];
           CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-            msl_info->attributes[n],(const char *) attributes[i],&exception));
+            msl_info->attributes[n],(const char *) attributes[i],exception));
           switch (*keyword)
           {
             case 'R':
@@ -6441,7 +6445,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
         keyword=(const char *) attributes[i++];
         CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-          msl_info->attributes[n],(const char *) attributes[i],&exception));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'G':
@@ -6530,7 +6534,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6540,7 +6544,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &msl_info->image[n]->background_color,&exception);
+                        &msl_info->image[n]->background_color,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6619,7 +6623,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6631,7 +6635,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) SignatureImage(msl_info->image[n],&exception);
+          (void) SignatureImage(msl_info->image[n],exception);
           break;
         }
       if (LocaleCompare((const char *) tag,"solarize") == 0)
@@ -6652,7 +6656,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6713,7 +6717,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6752,8 +6756,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          spread_image=SpreadImage(msl_info->image[n],geometry_info.rho,
-            msl_info->image[n]->interpolate,msl_info->exception);
+          spread_image=SpreadImage(msl_info->image[n],
+            msl_info->image[n]->interpolate,geometry_info.rho,
+            msl_info->exception);
           if (spread_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6763,7 +6768,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       else if (LocaleCompare((const char *) tag,"stegano") == 0)
       {
         Image *
-          watermark = (Image*)NULL;
+          watermark = (Image*) NULL;
 
         if (msl_info->image[n] == (Image *) NULL)
           {
@@ -6777,7 +6782,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
         keyword=(const char *) attributes[i++];
         CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-          msl_info->attributes[n],(const char *) attributes[i],&exception));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'I':
@@ -6789,7 +6794,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               const char *
                 theAttr = GetImageProperty(msl_info->attributes[j], "id",
-                      &exception);
+                      exception);
               if (theAttr && LocaleCompare(theAttr, value) == 0)
               {
                 watermark = msl_info->image[j];
@@ -6829,7 +6834,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       else if (LocaleCompare((const char *) tag,"stereo") == 0)
       {
         Image *
-          stereoImage = (Image*)NULL;
+          stereoImage = (Image*) NULL;
 
         if (msl_info->image[n] == (Image *) NULL)
           {
@@ -6842,7 +6847,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
         keyword=(const char *) attributes[i++];
         CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-          msl_info->attributes[n],(const char *) attributes[i],&exception));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'I':
@@ -6854,7 +6859,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               const char *
                 theAttr = GetImageProperty(msl_info->attributes[j], "id",
-                      &exception);
+                      exception);
               if (theAttr && LocaleCompare(theAttr, value) == 0)
               {
                 stereoImage = msl_info->image[j];
@@ -6908,7 +6913,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
@@ -6940,7 +6945,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -7004,7 +7009,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -7068,7 +7073,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -7080,7 +7085,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) SyncImage(msl_info->image[n],&exception);
+          (void) SyncImage(msl_info->image[n],exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
@@ -7109,7 +7114,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
                 msl_info->attributes[n],(const char *) attributes[i],
-                &exception);
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -7123,12 +7128,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *attribute;
 
                       attribute=GetImageProperty(msl_info->attributes[j],"id",
-                      &exception);
+                      exception);
                       if ((attribute != (const char *) NULL)  &&
                           (LocaleCompare(attribute,value) == 0))
                         {
                           texture_image=CloneImage(msl_info->image[j],0,0,
-                            MagickFalse,&exception);
+                            MagickFalse,exception);
                           break;
                         }
                     }
@@ -7142,7 +7147,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) TextureImage(msl_info->image[n],texture_image,&exception);
+          (void) TextureImage(msl_info->image[n],texture_image,exception);
           texture_image=DestroyImage(texture_image);
           break;
         }
@@ -7162,7 +7167,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
         keyword=(const char *) attributes[i++];
         CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-          msl_info->attributes[n],(const char *) attributes[i],&exception));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'T':
@@ -7188,7 +7193,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           process image.
         */
         {
-          BilevelImage(msl_info->image[n],threshold,&exception);
+          BilevelImage(msl_info->image[n],threshold,exception);
           break;
         }
       }
@@ -7205,7 +7210,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         {
           keyword=(const char *) attributes[i++];
           CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-            msl_info->attributes[n],(const char *) attributes[i],&exception));
+            msl_info->attributes[n],(const char *) attributes[i],exception));
           switch (*keyword)
           {
             case 'C':
@@ -7217,7 +7222,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   target;
 
                 (void) QueryColorCompliance(value,AllCompliance,&target,
-                  &exception);
+                  exception);
                 (void) TransparentPaintImage(msl_info->image[n],&target,
                   TransparentAlpha,MagickFalse,msl_info->exception);
                 break;
@@ -7282,7 +7287,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             keyword=(const char *) attributes[i++];
             CloneString(&value,InterpretImageProperties(msl_info->image_info[n],
-              msl_info->attributes[n],(const char *) attributes[i],&exception));
+              msl_info->attributes[n],(const char *) attributes[i],exception));
             switch (*keyword)
             {
               case 'F':
@@ -7291,7 +7296,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 if (LocaleCompare(keyword,"filename") == 0)
                   {
                     (void) CopyMagickString(msl_info->image[n]->filename,value,
-                      MaxTextExtent);
+                      MagickPathExtent);
                     break;
                   }
                 (void) SetMSLAttributes(msl_info,keyword,value);
@@ -7306,6 +7311,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
 
           /* process */
           {
+            *msl_info->image_info[n]->magick='\0';
             (void) WriteImage(msl_info->image_info[n], msl_info->image[n],
               msl_info->exception);
             break;
@@ -7321,6 +7327,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
   }
   if ( value != NULL )
     value=DestroyString(value);
+  (void) DestroyExceptionInfo(exception);
   (void) LogMagickEvent(CoderEvent,GetMagickModule(),"  )");
 }
 
@@ -7442,13 +7449,13 @@ static void MSLCharacters(void *context,const xmlChar *c,int length)
   msl_info=(MSLInfo *) context;
   if (msl_info->content != (char *) NULL)
     msl_info->content=(char *) ResizeQuantumMemory(msl_info->content,
-      strlen(msl_info->content)+length+MaxTextExtent,
+      strlen(msl_info->content)+length+MagickPathExtent,
       sizeof(*msl_info->content));
   else
     {
       msl_info->content=(char *) NULL;
-      if (~length >= (MaxTextExtent-1))
-        msl_info->content=(char *) AcquireQuantumMemory(length+MaxTextExtent,
+      if (~length >= (MagickPathExtent-1))
+        msl_info->content=(char *) AcquireQuantumMemory(length+MagickPathExtent,
           sizeof(*msl_info->content));
       if (msl_info->content != (char *) NULL)
         *msl_info->content='\0';
@@ -7530,7 +7537,7 @@ static void MSLWarning(void *context,const char *format,...)
 {
   char
     *message,
-    reason[MaxTextExtent];
+    reason[MagickPathExtent];
 
   MSLInfo
     *msl_info;
@@ -7550,7 +7557,7 @@ static void MSLWarning(void *context,const char *format,...)
 #if !defined(MAGICKCORE_HAVE_VSNPRINTF)
   (void) vsprintf(reason,format,operands);
 #else
-  (void) vsnprintf(reason,MaxTextExtent,format,operands);
+  (void) vsnprintf(reason,MagickPathExtent,format,operands);
 #endif
   message=GetExceptionMessage(errno);
   ThrowMSLException(CoderError,reason,message);
@@ -7561,7 +7568,7 @@ static void MSLWarning(void *context,const char *format,...)
 static void MSLError(void *context,const char *format,...)
 {
   char
-    reason[MaxTextExtent];
+    reason[MagickPathExtent];
 
   MSLInfo
     *msl_info;
@@ -7581,7 +7588,7 @@ static void MSLError(void *context,const char *format,...)
 #if !defined(MAGICKCORE_HAVE_VSNPRINTF)
   (void) vsprintf(reason,format,operands);
 #else
-  (void) vsnprintf(reason,MaxTextExtent,format,operands);
+  (void) vsnprintf(reason,MagickPathExtent,format,operands);
 #endif
   ThrowMSLException(DelegateFatalError,reason,"SAX error");
   va_end(operands);
@@ -7690,7 +7697,7 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,
   Image **image,ExceptionInfo *exception)
 {
   char
-    message[MaxTextExtent];
+    message[MagickPathExtent];
 
   Image
     *msl_image;
@@ -7714,7 +7721,7 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,
     Open image file.
   */
   assert(image_info != (const ImageInfo *) NULL);
-  assert(image_info->signature == MagickSignature);
+  assert(image_info->signature == MagickCoreSignature);
   if (image_info->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
       image_info->filename);
@@ -7825,12 +7832,12 @@ static Image *ReadMSLImage(const ImageInfo *image_info,ExceptionInfo *exception)
     Open image file.
   */
   assert(image_info != (const ImageInfo *) NULL);
-  assert(image_info->signature == MagickSignature);
+  assert(image_info->signature == MagickCoreSignature);
   if (image_info->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
       image_info->filename);
   assert(exception != (ExceptionInfo *) NULL);
-  assert(exception->signature == MagickSignature);
+  assert(exception->signature == MagickCoreSignature);
   image=(Image *) NULL;
   (void) ProcessMSLScript(image_info,&image,exception);
   return(GetFirstImageInList(image));
@@ -7868,13 +7875,12 @@ ModuleExport size_t RegisterMSLImage(void)
 #if defined(MAGICKCORE_XML_DELEGATE)
   xmlInitParser();
 #endif
-  entry=SetMagickInfo("MSL");
+  entry=AcquireMagickInfo("MSL","MSL","Magick Scripting Language");
 #if defined(MAGICKCORE_XML_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadMSLImage;
   entry->encoder=(EncodeImageHandler *) WriteMSLImage;
 #endif
-  entry->description=ConstantString("Magick Scripting Language");
-  entry->module=ConstantString("MSL");
+  entry->format_type=ImplicitFormatType;
   (void) RegisterMagickInfo(entry);
   return(MagickImageCoderSignature);
 }
@@ -7974,6 +7980,12 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
               exception);
           break;
         }
+      if (LocaleCompare(keyword,"alpha-color") == 0)
+        {
+          (void) QueryColorCompliance(value,AllCompliance,
+            &image_info->alpha_color,exception);
+          break;
+        }
       if (LocaleCompare(keyword,"antialias") == 0)
         {
           ssize_t
@@ -8063,7 +8075,7 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
         }
       if (LocaleCompare(keyword,"filename") == 0)
         {
-          (void) CopyMagickString(image_info->filename,value,MaxTextExtent);
+          (void) CopyMagickString(image_info->filename,value,MagickPathExtent);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -8102,13 +8114,7 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
     {
       if (LocaleCompare(keyword,"magick") == 0)
         {
-          (void) CopyMagickString(image_info->magick,value,MaxTextExtent);
-          break;
-        }
-      if (LocaleCompare(keyword,"mattecolor") == 0)
-        {
-          (void) QueryColorCompliance(value,AllCompliance,
-            &image_info->matte_color,exception);
+          (void) CopyMagickString(image_info->magick,value,MagickPathExtent);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -8226,9 +8232,9 @@ static MagickBooleanType WriteMSLImage(const ImageInfo *image_info,Image *image,
   ExceptionInfo *exception)
 {
   assert(image_info != (const ImageInfo *) NULL);
-  assert(image_info->signature == MagickSignature);
+  assert(image_info->signature == MagickCoreSignature);
   assert(image != (Image *) NULL);
-  assert(image->signature == MagickSignature);
+  assert(image->signature == MagickCoreSignature);
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   (void) ReferenceImage(image);