]> granicus.if.org Git - imagemagick/blobdiff - coders/msl.c
...
[imagemagick] / coders / msl.c
index 3e532587a1cc293d8aa81f2756851f050dcab10d..92d61e26dcd5e8b93847f7378d4038cd3c1652a4 100644 (file)
 %                    Execute Magick Scripting Language Scripts.               %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                             Leonard Rosenthol                               %
 %                             William Radcliffe                               %
 %                               December 2001                                 %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 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  %
 #include "MagickCore/studio.h"
 #include "MagickCore/annotate.h"
 #include "MagickCore/artifact.h"
+#include "MagickCore/attribute.h"
 #include "MagickCore/blob.h"
 #include "MagickCore/blob-private.h"
 #include "MagickCore/cache.h"
 #include "MagickCore/cache-view.h"
+#include "MagickCore/channel.h"
 #include "MagickCore/color.h"
-#include "MagickCore/colormap.h"
 #include "MagickCore/color-private.h"
+#include "MagickCore/colormap.h"
 #include "MagickCore/composite.h"
 #include "MagickCore/constitute.h"
 #include "MagickCore/decorate.h"
 #include "MagickCore/display.h"
+#include "MagickCore/distort.h"
 #include "MagickCore/draw.h"
 #include "MagickCore/effect.h"
 #include "MagickCore/enhance.h"
@@ -82,6 +85,7 @@
 #include "MagickCore/segment.h"
 #include "MagickCore/shear.h"
 #include "MagickCore/signature.h"
+#include "MagickCore/statistic.h"
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/string-private.h"
@@ -90,9 +94,7 @@
 #include "MagickCore/utility.h"
 #if defined(MAGICKCORE_XML_DELEGATE)
 #  if defined(MAGICKCORE_WINDOWS_SUPPORT)
-#    if defined(__MINGW32__)
-#      define _MSC_VER
-#    else
+#    if !defined(__MINGW32__) && !defined(__MINGW64__)
 #      include <win32config.h>
 #    endif
 #  endif
@@ -157,7 +159,7 @@ typedef struct _MSLInfo
 */
 #if defined(MAGICKCORE_XML_DELEGATE)
 static MagickBooleanType
-  WriteMSLImage(const ImageInfo *,Image *);
+  WriteMSLImage(const ImageInfo *,Image *,ExceptionInfo *);
 
 static MagickBooleanType
   SetMSLAttributes(MSLInfo *,const char *,const char *);
@@ -200,7 +202,7 @@ static inline Image *GetImageCache(const ImageInfo *image_info,const char *path,
   ExceptionInfo *exception)
 {
   char
-    key[MaxTextExtent];
+    key[MagickPathExtent];
 
   ExceptionInfo
     *sans_exception;
@@ -211,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)
@@ -563,21 +565,23 @@ 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]);
   if (image == (Image *) NULL)
-    msl_info->attributes[n]=AcquireImage(msl_info->image_info[n]);
+    msl_info->attributes[n]=AcquireImage(msl_info->image_info[n],
+      msl_info->exception);
   else
-    msl_info->attributes[n]=CloneImage(image,0,0,MagickTrue,&image->exception);
+    msl_info->attributes[n]=CloneImage(image,0,0,MagickTrue,
+      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++;
 }
@@ -609,7 +613,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
     channel_mask;
 
   char
-    key[MaxTextExtent],
+    key[MagickPathExtent],
     *value;
 
   const char
@@ -623,7 +627,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
     *draw_info;
 
   ExceptionInfo
-    exception;
+    *exception;
 
   GeometryInfo
     geometry_info;
@@ -659,12 +663,13 @@ 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;
   value=(char *) NULL;
   SetGeometryInfo(&geometry_info);
+  (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
   channel=DefaultChannels;
   switch (*tag)
   {
@@ -694,7 +699,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -739,10 +745,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
-          noise_image=AddNoiseImage(msl_info->image[n],noise,
-            &msl_info->image[n]->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+          channel_mask=SetImageChannelMask(msl_info->image[n],channel);
+          noise_image=AddNoiseImage(msl_info->image[n],noise,1.0,
+            msl_info->exception);
+          (void) SetPixelChannelMask(msl_info->image[n],channel_mask);
           if (noise_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -752,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.
@@ -773,7 +779,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -786,22 +793,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.rx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ry=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sy=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.tx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ty=StringToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -816,8 +823,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"antialias") == 0)
                     {
-                      option=ParseCommandOption(MagickBooleanOptions,MagickFalse,
-                        value);
+                      option=ParseCommandOption(MagickBooleanOptions,
+                        MagickFalse,value);
                       if (option < 0)
                         ThrowMSLException(OptionError,"UnrecognizedBooleanType",
                           value);
@@ -858,8 +865,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->fill,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->fill,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"family") == 0)
@@ -882,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)
@@ -904,8 +911,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=InterpretLocaleValue(value,
-                        (char **) NULL);
+                      draw_info->pointsize=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -917,7 +923,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -942,22 +948,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.ry=tan(DegreesToRadians(fmod((double) angle,
                         360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.rx=tan(DegreesToRadians(fmod((double) angle,
                         360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"stretch") == 0)
                     {
-                      option=ParseCommandOption(MagickStretchOptions,MagickFalse,
-                        value);
+                      option=ParseCommandOption(MagickStretchOptions,
+                        MagickFalse,value);
                       if (option < 0)
                         ThrowMSLException(OptionError,"UnrecognizedStretchType",
                           value);
@@ -966,8 +972,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword, "stroke") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->stroke,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->stroke,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
@@ -1015,8 +1021,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "undercolor") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->undercolor,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->undercolor,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1067,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);
@@ -1079,7 +1085,8 @@ 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) AnnotateImage(msl_info->image[n],draw_info);
+          (void) AnnotateImage(msl_info->image[n],draw_info,
+            msl_info->exception);
           draw_info=DestroyDrawInfo(draw_info);
           break;
         }
@@ -1103,7 +1110,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1133,7 +1141,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           append_image=AppendImages(msl_info->image[n],stack,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (append_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -1165,7 +1173,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1204,8 +1213,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
-                        (char **) NULL);
+                      geometry_info.rho=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1232,10 +1240,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
+          channel_mask=SetImageChannelMask(msl_info->image[n],channel);
           blur_image=BlurImage(msl_info->image[n],geometry_info.rho,
-            geometry_info.sigma,&msl_info->image[n]->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+            geometry_info.sigma,msl_info->exception);
+          (void) SetPixelChannelMask(msl_info->image[n],channel_mask);
           if (blur_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -1262,7 +1270,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1288,8 +1297,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
-                      (void) QueryColorDatabase(value,
-                        &msl_info->image[n]->border_color,&exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &msl_info->image[n]->border_color,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1302,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;
@@ -1344,7 +1353,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           border_image=BorderImage(msl_info->image[n],&geometry,
-            &msl_info->image[n]->exception);
+            msl_info->image[n]->compose,msl_info->exception);
           if (border_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -1359,12 +1368,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       if (LocaleCompare((const char *) tag,"colorize") == 0)
         {
           char
-            opacity[MaxTextExtent];
+            blend[MagickPathExtent];
 
           Image
             *colorize_image;
 
-          PixelPacket
+          PixelInfo
             target;
 
           /*
@@ -1376,36 +1385,37 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 (const char *) tag);
               break;
             }
-          target=msl_info->image[n]->background_color;
-          (void) CopyMagickString(opacity,"100",MaxTextExtent);
+          GetPixelInfo(msl_info->image[n],&target);
+          (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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
-                case 'F':
-                case 'f':
+                case 'B':
+                case 'b':
                 {
-                  if (LocaleCompare(keyword,"fill") == 0)
+                  if (LocaleCompare(keyword,"blend") == 0)
                     {
-                      (void) QueryColorDatabase(value,&target,
-                        &msl_info->image[n]->exception);
+                      (void) CopyMagickString(blend,value,MagickPathExtent);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
                     keyword);
                   break;
                 }
-                case 'O':
-                case 'o':
+                case 'F':
+                case 'f':
                 {
-                  if (LocaleCompare(keyword,"opacity") == 0)
+                  if (LocaleCompare(keyword,"fill") == 0)
                     {
-                      (void) CopyMagickString(opacity,value,MaxTextExtent);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &target,msl_info->exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1420,8 +1430,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          colorize_image=ColorizeImage(msl_info->image[n],opacity,target,
-            &msl_info->image[n]->exception);
+          colorize_image=ColorizeImage(msl_info->image[n],blend,&target,
+            msl_info->exception);
           if (colorize_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -1430,7 +1440,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         }
       if (LocaleCompare((const char *) tag, "charcoal") == 0)
       {
-        double  radius = 0.0,
+        double 
+            radius = 0.0,
             sigma = 1.0;
 
         if (msl_info->image[n] == (Image *) NULL)
@@ -1448,15 +1459,15 @@ 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]));
+            msl_info->attributes[n],(const char *) attributes[i],exception));
           switch (*keyword)
           {
             case 'R':
             case 'r':
             {
-              if (LocaleCompare(keyword, "radius") == 0)
+              if (LocaleCompare(keyword,"radius") == 0)
               {
-                radius = InterpretLocaleValue(value,(char **) NULL);
+                radius=StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -1490,7 +1501,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           *newImage;
 
         newImage=CharcoalImage(msl_info->image[n],radius,sigma,
-          &msl_info->image[n]->exception);
+          msl_info->exception);
         if (newImage == (Image *) NULL)
           break;
         msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -1518,7 +1529,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1528,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;
@@ -1594,7 +1606,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           chop_image=ChopImage(msl_info->image[n],&geometry,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (chop_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -1627,7 +1639,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1636,7 +1649,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"bordercolor") == 0)
                     {
-                      (void) QueryMagickColor(value,&target,&exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &target,exception);
                       paint_method=FillToBorderMethod;
                       break;
                     }
@@ -1649,13 +1663,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"fill") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->fill,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->fill,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+                      msl_info->image[n]->fuzz=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -1669,11 +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) GetOneVirtualMagickPixel(msl_info->image[n],
-                        geometry.x,geometry.y,&target,&exception);
+                      (void) GetOneVirtualPixelInfo(msl_info->image[n],
+                        TileVirtualPixelMethod,geometry.x,geometry.y,&target,
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1686,8 +1701,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"x") == 0)
                     {
                       geometry.x=StringToLong(value);
-                      (void) GetOneVirtualMagickPixel(msl_info->image[n],
-                        geometry.x,geometry.y,&target,&exception);
+                      (void) GetOneVirtualPixelInfo(msl_info->image[n],
+                        TileVirtualPixelMethod,geometry.x,geometry.y,&target,
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1700,8 +1716,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"y") == 0)
                     {
                       geometry.y=StringToLong(value);
-                      (void) GetOneVirtualMagickPixel(msl_info->image[n],
-                        geometry.x,geometry.y,&target,&exception);
+                      (void) GetOneVirtualPixelInfo(msl_info->image[n],
+                        TileVirtualPixelMethod,geometry.x,geometry.y,&target,
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1718,7 +1735,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             }
           (void) FloodfillPaintImage(msl_info->image[n],draw_info,&target,
             geometry.x,geometry.y,paint_method == FloodfillMethod ?
-            MagickFalse : MagickTrue,&msl_info->image[n]->exception);
+            MagickFalse : MagickTrue,msl_info->exception);
           draw_info=DestroyDrawInfo(draw_info);
           break;
         }
@@ -1727,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;
@@ -1736,9 +1753,6 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             *composite_image,
             *rotate_image;
 
-          PixelPacket
-            target;
-
           /*
             Composite image.
           */
@@ -1755,7 +1769,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1764,8 +1779,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"compose") == 0)
                     {
-                      option=ParseCommandOption(MagickComposeOptions,MagickFalse,
-                        value);
+                      option=ParseCommandOption(MagickComposeOptions,
+                        MagickFalse,value);
                       if (option < 0)
                         ThrowMSLException(OptionError,"UnrecognizedComposeType",
                           value);
@@ -1783,12 +1798,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       const char
                         *attribute;
 
-                      attribute=GetImageProperty(msl_info->attributes[j],"id");
+                      attribute=GetImageProperty(msl_info->attributes[j],"id",
+                        exception);
                       if ((attribute != (const char *) NULL)  &&
                           (LocaleCompare(attribute,value) == 0))
                         {
                           composite_image=CloneImage(msl_info->image[j],0,0,
-                            MagickFalse,&exception);
+                            MagickFalse,exception);
                           break;
                         }
                     }
@@ -1807,7 +1823,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -1838,8 +1855,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword, "color") == 0)
                     {
-                      (void) QueryColorDatabase(value,
-                        &composite_image->background_color,&exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &composite_image->background_color,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"compose") == 0)
@@ -1854,17 +1871,15 @@ 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) GetOneVirtualPixel(msl_info->image[n],geometry.x,
-                        geometry.y,&target,&exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"gravity") == 0)
                     {
-                      option=ParseCommandOption(MagickGravityOptions,MagickFalse,
-                        value);
+                      option=ParseCommandOption(MagickGravityOptions,
+                        MagickFalse,value);
                       if (option < 0)
                         ThrowMSLException(OptionError,"UnrecognizedGravityType",
                           value);
@@ -1893,13 +1908,16 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       const char
                         *attribute;
 
-                      attribute=GetImageProperty(msl_info->attributes[j],"id");
+                      attribute=GetImageProperty(msl_info->attributes[j],"id",
+                        exception);
                       if ((attribute != (const char *) NULL)  &&
                           (LocaleCompare(value,value) == 0))
                         {
-                          SetImageType(composite_image,TrueColorMatteType);
+                          SetImageType(composite_image,TrueColorAlphaType,
+                            exception);
                           (void) CompositeImage(composite_image,
-                            CopyOpacityCompositeOp,msl_info->image[j],0,0);
+                            msl_info->image[j],CopyAlphaCompositeOp,MagickTrue,
+                            0,0,exception);
                           break;
                         }
                     }
@@ -1928,19 +1946,20 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       opacity=StringToLong(value);
                       if (compose != DissolveCompositeOp)
                         {
-                          (void) SetImageOpacity(composite_image,(Quantum)
-                            opacity);
+                          (void) SetImageAlpha(composite_image,(Quantum)
+                            opacity,exception);
                           break;
                         }
                       (void) SetImageArtifact(msl_info->image[n],
                                             "compose:args",value);
-                      if (composite_image->matte != MagickTrue)
-                        (void) SetImageOpacity(composite_image,OpaqueAlpha);
-                      composite_view=AcquireCacheView(composite_image);
+                      if (composite_image->alpha_trait == UndefinedPixelTrait)
+                        (void) SetImageAlpha(composite_image,OpaqueAlpha,
+                          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)
@@ -1948,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);
@@ -1964,7 +1983,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
                       rotate_image=RotateImage(composite_image,
-                        InterpretLocaleValue(value,(char **) NULL),&exception);
+                        StringToDouble(value,(char **) NULL),exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1999,11 +2018,11 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                          for (x=0; x < (ssize_t) image->columns; x+=(ssize_t) width)
                          {
                            if (rotate_image != (Image *) NULL)
-                             (void) CompositeImage(image,compose,rotate_image,
-                               x,y);
+                             (void) CompositeImage(image,rotate_image,compose,
+                               MagickTrue,x,y,exception);
                            else
-                             (void) CompositeImage(image,compose,
-                               composite_image,x,y);
+                             (void) CompositeImage(image,composite_image,
+                               compose,MagickTrue,x,y,exception);
                          }
                       if (rotate_image != (Image *) NULL)
                         rotate_image=DestroyImage(rotate_image);
@@ -2019,8 +2038,6 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"x") == 0)
                     {
                       geometry.x=StringToLong(value);
-                      (void) GetOneVirtualPixel(msl_info->image[n],geometry.x,
-                        geometry.y,&target,&exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2033,8 +2050,6 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"y") == 0)
                     {
                       geometry.y=StringToLong(value);
-                      (void) GetOneVirtualPixel(msl_info->image[n],geometry.x,
-                        geometry.y,&target,&exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2050,15 +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);
-          channel_mask=SetPixelChannelMask(image,channel);
+            exception);
+          channel_mask=SetImageChannelMask(image,channel);
           if (rotate_image == (Image *) NULL)
-            CompositeImage(image,compose,composite_image,geometry.x,geometry.y);
+            CompositeImage(image,composite_image,compose,MagickTrue,geometry.x,
+              geometry.y,exception);
           else
             {
               /*
@@ -2066,11 +2082,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               */
               geometry.x-=(ssize_t) (rotate_image->columns-
                 composite_image->columns)/2;
-              geometry.y-=(ssize_t) (rotate_image->rows-composite_image->rows)/2;
-              CompositeImage(image,compose,rotate_image,geometry.x,geometry.y);
+              geometry.y-=(ssize_t) (rotate_image->rows-
+                composite_image->rows)/2;
+              CompositeImage(image,rotate_image,compose,MagickTrue,geometry.x,
+                geometry.y,exception);
               rotate_image=DestroyImage(rotate_image);
             }
-          (void) SetPixelChannelMask(image,channel_mask);
+          (void) SetImageChannelMask(image,channel_mask);
           composite_image=DestroyImage(composite_image);
           break;
         }
@@ -2094,7 +2112,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2124,7 +2143,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           (void) ContrastImage(msl_info->image[n],sharpen,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           break;
         }
       if (LocaleCompare((const char *) tag,"crop") == 0)
@@ -2147,7 +2166,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2157,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",
@@ -2221,7 +2241,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           crop_image=CropImage(msl_info->image[n],&geometry,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (crop_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -2248,7 +2268,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2272,7 +2293,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) CycleColormapImage(msl_info->image[n],display);
+          (void) CycleColormapImage(msl_info->image[n],display,exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
@@ -2299,12 +2320,13 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
           despeckle_image=DespeckleImage(msl_info->image[n],
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (despeckle_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -2324,7 +2346,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2336,13 +2359,14 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) DisplayImages(msl_info->image_info[n],msl_info->image[n]);
+          (void) DisplayImages(msl_info->image_info[n],msl_info->image[n],
+            msl_info->exception);
           break;
         }
       if (LocaleCompare((const char *) tag,"draw") == 0)
         {
           char
-            text[MaxTextExtent];
+            text[MagickPathExtent];
 
           /*
             Annotate image.
@@ -2363,7 +2387,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2376,22 +2401,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.rx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ry=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sy=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.tx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ty=StringToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -2448,8 +2473,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->fill,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->fill,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"family") == 0)
@@ -2472,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;
@@ -2494,17 +2519,32 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 case 'P':
                 case 'p':
                 {
-                  if (LocaleCompare(keyword,"primitive") == 0)
+                  if (LocaleCompare(keyword,"points") == 0)
                     {
-                      CloneString(&draw_info->primitive,value);
+                      if (LocaleCompare(draw_info->primitive,"path") == 0)
+                        {
+                          (void) ConcatenateString(&draw_info->primitive," '");
+                          ConcatenateString(&draw_info->primitive,value);
+                          (void) ConcatenateString(&draw_info->primitive,"'");
+                        }
+                      else
+                        {
+                          (void) ConcatenateString(&draw_info->primitive," ");
+                          ConcatenateString(&draw_info->primitive,value);
+                        }
                       break;
                     }
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=InterpretLocaleValue(value,
+                      draw_info->pointsize=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
+                  if (LocaleCompare(keyword,"primitive") == 0)
+                    {
+                      CloneString(&draw_info->primitive,value);
+                      break;
+                    }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
                     keyword);
                   break;
@@ -2514,7 +2554,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -2539,20 +2579,20 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"stretch") == 0)
                     {
-                      option=ParseCommandOption(MagickStretchOptions,MagickFalse,
-                        value);
+                      option=ParseCommandOption(MagickStretchOptions,
+                        MagickFalse,value);
                       if (option < 0)
                         ThrowMSLException(OptionError,"UnrecognizedStretchType",
                           value);
@@ -2561,8 +2601,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword, "stroke") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->stroke,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->stroke,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
@@ -2589,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)
@@ -2610,8 +2652,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "undercolor") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->undercolor,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->undercolor,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2662,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);
@@ -2674,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);
+          (void) DrawImage(msl_info->image[n],draw_info,exception);
           draw_info=DestroyDrawInfo(draw_info);
           break;
         }
@@ -2702,7 +2744,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2725,8 +2768,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
-                        (char **) NULL);
+                      geometry_info.rho=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2742,7 +2784,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           edge_image=EdgeImage(msl_info->image[n],geometry_info.rho,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (edge_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -2768,7 +2810,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2791,7 +2834,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -2820,7 +2863,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           emboss_image=EmbossImage(msl_info->image[n],geometry_info.rho,
-            geometry_info.sigma,&msl_info->image[n]->exception);
+            geometry_info.sigma,msl_info->exception);
           if (emboss_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -2846,12 +2889,13 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
           enhance_image=EnhanceImage(msl_info->image[n],
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (enhance_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -2874,7 +2918,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -2887,7 +2932,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           (void) EqualizeImage(msl_info->image[n],
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
@@ -2912,7 +2957,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             *newImage;
 
           newImage=MergeImageLayers(msl_info->image[n],FlattenLayer,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (newImage == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -2939,12 +2984,13 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
           flip_image=FlipImage(msl_info->image[n],
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (flip_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -2970,12 +3016,13 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
           flop_image=FlopImage(msl_info->image[n],
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (flop_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -2999,13 +3046,15 @@ 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++)
             {
               keyword=(const char *) attributes[i++];
               attribute=InterpretImageProperties(msl_info->image_info[n],
-                msl_info->attributes[n],(const char *) attributes[i]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3031,8 +3080,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
-                      (void) QueryColorDatabase(value,
-                        &msl_info->image[n]->matte_color,&exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &msl_info->image[n]->alpha_color,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3045,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;
@@ -3119,7 +3168,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           frame_info.width=msl_info->image[n]->columns+2*frame_info.x;
           frame_info.height=msl_info->image[n]->rows+2*frame_info.y;
           frame_image=FrameImage(msl_info->image[n],&frame_info,
-            &msl_info->image[n]->exception);
+            msl_info->image[n]->compose,msl_info->exception);
           if (frame_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -3134,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;
@@ -3158,7 +3207,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3167,7 +3217,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"blue") == 0)
                     {
-                      pixel.blue=InterpretLocaleValue(value,(char **) NULL);
+                      pixel.blue=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3195,12 +3245,12 @@ 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)
                     {
-                      pixel.green=InterpretLocaleValue(value,(char **) NULL);
+                      pixel.green=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3212,7 +3262,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"red") == 0)
                     {
-                      pixel.red=InterpretLocaleValue(value,(char **) NULL);
+                      pixel.red=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3228,10 +3278,10 @@ 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),
-            &msl_info->image[n]->exception);
+          (void) GammaImage(msl_info->image[n],strtod(gamma,(char **) NULL),
+            msl_info->exception);
           break;
         }
       else if (LocaleCompare((const char *) tag,"get") == 0)
@@ -3248,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':
@@ -3256,9 +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);
+                    (void) SetImageProperty(msl_info->attributes[n],key,value,
+                      exception);
                     break;
                   }
                 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3268,9 +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);
+                    (void) SetImageProperty(msl_info->attributes[n],key,value,
+                      exception);
                     break;
                   }
                 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3306,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]));
+              msl_info->attributes[n],(const char *) attributes[i],exception));
             switch (*keyword)
             {
               case 'C':
@@ -3318,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)
@@ -3374,7 +3426,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3383,7 +3436,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"amount") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3414,7 +3467,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           implode_image=ImplodeImage(msl_info->image[n],geometry_info.rho,
-            &msl_info->image[n]->exception);
+            msl_info->image[n]->interpolate,msl_info->exception);
           if (implode_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -3445,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':
@@ -3453,7 +3506,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"black") == 0)
               {
-                levelBlack = InterpretLocaleValue(value,(char **) NULL);
+                levelBlack = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3464,7 +3517,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"gamma") == 0)
               {
-                levelGamma = InterpretLocaleValue(value,(char **) NULL);
+                levelGamma = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3475,7 +3528,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"white") == 0)
               {
-                levelWhite = InterpretLocaleValue(value,(char **) NULL);
+                levelWhite = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3491,7 +3544,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
 
         /* process image */
         LevelImage(msl_info->image[n],levelBlack,levelWhite,levelGamma,
-          &msl_info->image[n]->exception);
+          msl_info->exception);
         break;
       }
     }
@@ -3517,12 +3570,13 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
           magnify_image=MagnifyImage(msl_info->image[n],
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (magnify_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -3556,7 +3610,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3586,12 +3641,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       const char
                         *attribute;
 
-                      attribute=GetImageProperty(msl_info->attributes[j],"id");
+                      attribute=GetImageProperty(msl_info->attributes[j],"id",
+                        exception);
                       if ((attribute != (const char *) NULL)  &&
                           (LocaleCompare(attribute,value) == 0))
                         {
                           affinity_image=CloneImage(msl_info->image[j],0,0,
-                            MagickFalse,&exception);
+                            MagickFalse,exception);
                           break;
                         }
                     }
@@ -3606,9 +3662,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           quantize_info=AcquireQuantizeInfo(msl_info->image_info[n]);
-          quantize_info->dither=dither;
+          quantize_info->dither_method=dither != MagickFalse ?
+            RiemersmaDitherMethod : NoDitherMethod;
           (void) RemapImages(quantize_info,msl_info->image[n],
-            affinity_image);
+            affinity_image,exception);
           quantize_info=DestroyQuantizeInfo(quantize_info);
           affinity_image=DestroyImage(affinity_image);
           break;
@@ -3641,7 +3698,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3650,7 +3708,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"bordercolor") == 0)
                     {
-                      (void) QueryMagickColor(value,&target,&exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &target,exception);
                       paint_method=FillToBorderMethod;
                       break;
                     }
@@ -3663,7 +3722,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+                      msl_info->image[n]->fuzz=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3677,11 +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) GetOneVirtualMagickPixel(msl_info->image[n],
-                        geometry.x,geometry.y,&target,&exception);
+                      (void) GetOneVirtualPixelInfo(msl_info->image[n],
+                        TileVirtualPixelMethod,geometry.x,geometry.y,&target,
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3693,7 +3753,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"opacity") == 0)
                     {
-                      opacity=InterpretLocaleValue(value,(char **) NULL);
+                      opacity=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3706,8 +3766,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"x") == 0)
                     {
                       geometry.x=StringToLong(value);
-                      (void) GetOneVirtualMagickPixel(msl_info->image[n],
-                        geometry.x,geometry.y,&target,&exception);
+                      (void) GetOneVirtualPixelInfo(msl_info->image[n],
+                        TileVirtualPixelMethod,geometry.x,geometry.y,&target,
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3720,8 +3781,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"y") == 0)
                     {
                       geometry.y=StringToLong(value);
-                      (void) GetOneVirtualMagickPixel(msl_info->image[n],
-                        geometry.x,geometry.y,&target,&exception);
+                      (void) GetOneVirtualPixelInfo(msl_info->image[n],
+                        TileVirtualPixelMethod,geometry.x,geometry.y,&target,
+                        exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3739,11 +3801,11 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           draw_info=CloneDrawInfo(msl_info->image_info[n],
             msl_info->draw_info[n]);
           draw_info->fill.alpha=ClampToQuantum(opacity);
-          channel_mask=SetPixelChannelMask(msl_info->image[n],AlphaChannel);
+          channel_mask=SetImageChannelMask(msl_info->image[n],AlphaChannel);
           (void) FloodfillPaintImage(msl_info->image[n],draw_info,&target,
             geometry.x,geometry.y,paint_method == FloodfillMethod ?
-            MagickFalse : MagickTrue,&msl_info->image[n]->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+            MagickFalse : MagickTrue,msl_info->exception);
+          (void) SetPixelChannelMask(msl_info->image[n],channel_mask);
           draw_info=DestroyDrawInfo(draw_info);
           break;
         }
@@ -3766,7 +3828,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3789,7 +3852,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3807,7 +3870,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             }
           median_image=StatisticImage(msl_info->image[n],MedianStatistic,
             (size_t) geometry_info.rho,(size_t) geometry_info.sigma,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (median_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -3833,12 +3896,13 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
             }
           minify_image=MinifyImage(msl_info->image[n],
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (minify_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -3850,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.
@@ -3869,7 +3933,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -3878,13 +3943,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"blackness") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
                   if (LocaleCompare(keyword,"brightness") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3909,7 +3974,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"hue") == 0)
                     {
-                      geometry_info.xi=InterpretLocaleValue(value,
+                      geometry_info.xi=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3922,7 +3987,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"lightness") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3935,7 +4000,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"saturation") == 0)
                     {
-                      geometry_info.sigma=InterpretLocaleValue(value,
+                      geometry_info.sigma=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3948,7 +4013,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"whiteness") == 0)
                     {
-                      geometry_info.sigma=InterpretLocaleValue(value,
+                      geometry_info.sigma=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3964,10 +4029,10 @@ 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->image[n]->exception);
+            msl_info->exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
@@ -3995,7 +4060,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4040,10 +4106,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
+          channel_mask=SetImageChannelMask(msl_info->image[n],channel);
           (void) NegateImage(msl_info->image[n],gray,
-            &msl_info->image[n]->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+            msl_info->exception);
+          (void) SetPixelChannelMask(msl_info->image[n],channel_mask);
           break;
         }
       if (LocaleCompare((const char *) tag,"normalize") == 0)
@@ -4062,7 +4128,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4091,7 +4158,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           (void) NormalizeImage(msl_info->image[n],
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
@@ -4118,7 +4185,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4141,7 +4209,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -4158,7 +4226,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           paint_image=OilPaintImage(msl_info->image[n],geometry_info.rho,
-            geometry_info.sigma,&msl_info->image[n]->exception);
+            geometry_info.sigma,msl_info->exception);
           if (paint_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -4180,14 +4248,17 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 (const char *) tag);
               break;
             }
-          (void) QueryMagickColor("none",&target,&exception);
-          (void) QueryMagickColor("none",&fill_color,&exception);
+          (void) QueryColorCompliance("none",AllCompliance,&target,
+            exception);
+          (void) QueryColorCompliance("none",AllCompliance,&fill_color,
+            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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4212,12 +4283,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"fill") == 0)
                     {
-                      (void) QueryMagickColor(value,&fill_color,&exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &fill_color,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+                      msl_info->image[n]->fuzz=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -4233,10 +4305,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
+          channel_mask=SetImageChannelMask(msl_info->image[n],channel);
           (void) OpaquePaintImage(msl_info->image[n],&target,&fill_color,
-            MagickFalse,&msl_info->image[n]->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+            MagickFalse,msl_info->exception);
+          (void) SetPixelChannelMask(msl_info->image[n],channel_mask);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
@@ -4252,7 +4324,8 @@ 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]);
+              msl_info->attributes[n],(const char *) attributes[i],
+              exception);
             CloneString(&value,attribute);
             switch (*keyword)
             {
@@ -4302,15 +4375,16 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
-              if (*keyword == '+')
+              if (*keyword == '!')
                 {
                   /*
                     Remove a profile from the image.
                   */
                   (void) ProfileImage(msl_info->image[n],keyword,
-                    (const unsigned char *) NULL,0,MagickTrue);
+                    (const unsigned char *) NULL,0,exception);
                   continue;
                 }
               /*
@@ -4320,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;
@@ -4334,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))
@@ -4352,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),MagickFalse);
+                        GetStringInfoLength(profile),exception);
                       profile=DestroyStringInfo(profile);
                     }
                   continue;
@@ -4370,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),MagickFalse);
+                    GetStringInfoLength(profile),exception);
                 name=GetNextImageProfile(profile_image);
               }
               profile_image=DestroyImage(profile_image);
@@ -4402,7 +4476,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4433,12 +4508,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"dither") == 0)
                     {
-                      option=ParseCommandOption(MagickBooleanOptions,MagickFalse,
+                      option=ParseCommandOption(MagickDitherOptions,MagickFalse,
                         value);
                       if (option < 0)
                         ThrowMSLException(OptionError,"UnrecognizedBooleanType",
                           value);
-                      quantize_info.dither=(MagickBooleanType) option;
+                      quantize_info.dither_method=(DitherMethod) option;
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4482,13 +4557,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) QuantizeImage(&quantize_info,msl_info->image[n]);
+          (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;
@@ -4509,7 +4584,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4522,22 +4598,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.rx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ry=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sy=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.tx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ty=StringToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -4594,8 +4670,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->fill,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->fill,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"family") == 0)
@@ -4618,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;
@@ -4642,7 +4718,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=InterpretLocaleValue(value,
+                      draw_info->pointsize=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -4655,7 +4731,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -4680,20 +4756,20 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"stretch") == 0)
                     {
-                      option=ParseCommandOption(MagickStretchOptions,MagickFalse,
-                        value);
+                      option=ParseCommandOption(MagickStretchOptions,
+                        MagickFalse,value);
                       if (option < 0)
                         ThrowMSLException(OptionError,"UnrecognizedStretchType",
                           value);
@@ -4702,8 +4778,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword, "stroke") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->stroke,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->stroke,exception);
                       break;
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
@@ -4751,8 +4827,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "undercolor") == 0)
                     {
-                      (void) QueryColorDatabase(value,&draw_info->undercolor,
-                        &exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &draw_info->undercolor,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4803,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);
@@ -4815,7 +4891,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             affine.tx;
           draw_info->affine.ty=affine.rx*current.tx+affine.sy*current.ty+
             affine.ty;
-          status=GetTypeMetrics(msl_info->attributes[n],draw_info,&metrics);
+          status=GetTypeMetrics(msl_info->attributes[n],draw_info,&metrics,
+            msl_info->exception);
           if (status != MagickFalse)
             {
               Image
@@ -4878,7 +4955,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -4888,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;
@@ -4947,7 +5025,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           (void) RaiseImage(msl_info->image[n],&geometry,raise,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           break;
         }
       if (LocaleCompare((const char *) tag,"read") == 0)
@@ -4958,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]));
+              msl_info->attributes[n],(const char *) attributes[i],exception));
             switch (*keyword)
             {
               case 'F':
@@ -4969,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);
@@ -5009,7 +5089,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5032,7 +5113,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -5050,7 +5131,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             }
           paint_image=StatisticImage(msl_info->image[n],NonpeakStatistic,
             (size_t) geometry_info.rho,(size_t) geometry_info.sigma,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (paint_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5077,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]));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'G':
@@ -5204,20 +5285,9 @@ 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]));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
-          case 'b':
-          {
-            if (LocaleCompare(keyword,"blur") == 0)
-              {
-                msl_info->image[n]->blur=InterpretLocaleValue(value,
-                        (char **) NULL);
-                break;
-              }
-            ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
-            break;
-          }
           case 'G':
           case 'g':
           {
@@ -5241,7 +5311,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             if (LocaleCompare(keyword,"x-resolution") == 0)
               {
-                x_resolution=InterpretLocaleValue(value,(char **) NULL);
+                x_resolution=StringToDouble(value,(char **) NULL);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5252,7 +5322,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             if (LocaleCompare(keyword,"y-resolution") == 0)
               {
-                y_resolution=InterpretLocaleValue(value,(char **) NULL);
+                y_resolution=StringToDouble(value,(char **) NULL);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5279,14 +5349,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         if (msl_info->image[n]->units == PixelsPerCentimeterResolution)
           factor=2.54;
         width=(size_t) (x_resolution*msl_info->image[n]->columns/
-          (factor*(msl_info->image[n]->x_resolution == 0.0 ? DefaultResolution :
-          msl_info->image[n]->x_resolution))+0.5);
+          (factor*(msl_info->image[n]->resolution.x == 0.0 ? DefaultResolution :
+          msl_info->image[n]->resolution.x))+0.5);
         height=(size_t) (y_resolution*msl_info->image[n]->rows/
-          (factor*(msl_info->image[n]->y_resolution == 0.0 ? DefaultResolution :
-          msl_info->image[n]->y_resolution))+0.5);
+          (factor*(msl_info->image[n]->resolution.y == 0.0 ? DefaultResolution :
+          msl_info->image[n]->resolution.y))+0.5);
         resample_image=ResizeImage(msl_info->image[n],width,height,
-          msl_info->image[n]->filter,msl_info->image[n]->blur,
-          &msl_info->image[n]->exception);
+          msl_info->image[n]->filter,msl_info->exception);
         if (resample_image == (Image *) NULL)
           break;
         msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5296,10 +5365,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
     }
       if (LocaleCompare((const char *) tag,"resize") == 0)
         {
-          double
-            blur;
-
-          FilterTypes
+          FilterType
             filter;
 
           Image
@@ -5315,13 +5381,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               break;
             }
           filter=UndefinedFilter;
-          blur=1.0;
           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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5335,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",
@@ -5348,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",
@@ -5367,18 +5433,6 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     keyword);
                   break;
                 }
-                case 'S':
-                case 's':
-                {
-                  if (LocaleCompare(keyword,"support") == 0)
-                    {
-                      blur=InterpretLocaleValue(value,(char **) NULL);
-                      break;
-                    }
-                  ThrowMSLException(OptionError,"UnrecognizedAttribute",
-                    keyword);
-                  break;
-                }
                 case 'W':
                 case 'w':
                 {
@@ -5400,7 +5454,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           resize_image=ResizeImage(msl_info->image[n],geometry.width,
-            geometry.height,filter,blur,&msl_info->image[n]->exception);
+            geometry.height,filter,msl_info->exception);
           if (resize_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5427,7 +5481,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5437,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;
@@ -5479,7 +5534,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           roll_image=RollImage(msl_info->image[n],geometry.x,geometry.y,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (roll_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5505,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]));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'G':
@@ -5556,7 +5611,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         Image
           *newImage;
 
-        newImage=RollImage(msl_info->image[n], x, y, &msl_info->image[n]->exception);
+        newImage=RollImage(msl_info->image[n], x, y, msl_info->exception);
         if (newImage == (Image *) NULL)
           break;
         msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5584,7 +5639,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5593,7 +5649,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"degrees") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -5624,7 +5680,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           rotate_image=RotateImage(msl_info->image[n],geometry_info.rho,
-            &msl_info->image[n]->exception);
+            msl_info->exception);
           if (rotate_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5648,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]));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'D':
@@ -5656,7 +5712,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
           if (LocaleCompare(keyword,"degrees") == 0)
             {
-            degrees = InterpretLocaleValue(value,(char **) NULL);
+            degrees = StringToDouble(value,(char **) NULL);
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5677,7 +5733,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         Image
           *newImage;
 
-        newImage=RotateImage(msl_info->image[n], degrees, &msl_info->image[n]->exception);
+        newImage=RotateImage(msl_info->image[n], degrees, msl_info->exception);
         if (newImage == (Image *) NULL)
           break;
         msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5710,7 +5766,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5720,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",
@@ -5760,7 +5817,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           sample_image=SampleImage(msl_info->image[n],geometry.width,
-            geometry.height,&msl_info->image[n]->exception);
+            geometry.height,msl_info->exception);
           if (sample_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5786,7 +5843,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5796,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",
@@ -5836,7 +5894,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           scale_image=ScaleImage(msl_info->image[n],geometry.width,
-            geometry.height,&msl_info->image[n]->exception);
+            geometry.height,msl_info->exception);
           if (scale_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -5862,14 +5920,15 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             }
           geometry_info.rho=1.0;
           geometry_info.sigma=1.5;
-          colorspace=RGBColorspace;
+          colorspace=sRGBColorspace;
           verbose=MagickFalse;
           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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -5878,7 +5937,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"cluster-threshold") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -5915,7 +5974,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"smoothing-threshold") == 0)
                     {
-                      geometry_info.sigma=InterpretLocaleValue(value,
+                      geometry_info.sigma=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -5932,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);
+            geometry_info.rho,geometry_info.sigma,exception);
           break;
         }
       else if (LocaleCompare((const char *) tag, "set") == 0)
@@ -5949,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]));
+            msl_info->attributes[n],(const char *) attributes[i],exception));
           switch (*keyword)
           {
             case 'C':
@@ -5962,10 +6021,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     const char
                       *property;
 
-                    property=GetImageProperty(msl_info->attributes[j],"id");
+                    property=GetImageProperty(msl_info->attributes[j],"id",
+                      exception);
                     if (LocaleCompare(property,value) == 0)
                       {
-                        SetImageMask(msl_info->image[n],msl_info->image[j]);
+                        SetImageMask(msl_info->image[n],ReadPixelMask,
+                          msl_info->image[j],exception);
                         break;
                       }
                   }
@@ -5978,10 +6039,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     const char
                       *property;
 
-                    property=GetImageProperty(msl_info->attributes[j],"id");
+                    property=GetImageProperty(msl_info->attributes[j],"id",
+                      exception);
                     if (LocaleCompare(property,value) == 0)
                       {
-                        SetImageClipMask(msl_info->image[n],msl_info->image[j]);
+                        SetImageMask(msl_info->image[n],ReadPixelMask,
+                          msl_info->image[j],exception);
                         break;
                       }
                   }
@@ -5998,11 +6061,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     ThrowMSLException(OptionError,"UnrecognizedColorspace",
                       value);
                   (void) TransformImageColorspace(msl_info->image[n],
-                    (ColorspaceType) colorspace);
+                    (ColorspaceType) colorspace,exception);
                   break;
                 }
               (void) SetMSLAttributes(msl_info,keyword,value);
-              (void) SetImageProperty(msl_info->image[n],keyword,value);
+              (void) SetImageProperty(msl_info->image[n],keyword,value,
+                exception);
               break;
             }
             case 'D':
@@ -6011,15 +6075,16 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               if (LocaleCompare(keyword,"density") == 0)
                 {
                   flags=ParseGeometry(value,&geometry_info);
-                  msl_info->image[n]->x_resolution=geometry_info.rho;
-                  msl_info->image[n]->y_resolution=geometry_info.sigma;
+                  msl_info->image[n]->resolution.x=geometry_info.rho;
+                  msl_info->image[n]->resolution.y=geometry_info.sigma;
                   if ((flags & SigmaValue) == 0)
-                    msl_info->image[n]->y_resolution=
-                      msl_info->image[n]->x_resolution;
+                    msl_info->image[n]->resolution.y=
+                      msl_info->image[n]->resolution.x;
                   break;
                 }
               (void) SetMSLAttributes(msl_info,keyword,value);
-              (void) SetImageProperty(msl_info->image[n],keyword,value);
+              (void) SetImageProperty(msl_info->image[n],keyword,value,
+                exception);
               break;
             }
             case 'O':
@@ -6037,11 +6102,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     opac = (int)(QuantumRange * ((float)opac/100));
                   } else
                     opac = StringToLong( value );
-                  (void) SetImageOpacity( msl_info->image[n], (Quantum) opac );
+                  (void) SetImageAlpha( msl_info->image[n], (Quantum) opac,
+                    exception);
                   break;
               }
               (void) SetMSLAttributes(msl_info,keyword,value);
-              (void) SetImageProperty(msl_info->image[n],keyword,value);
+              (void) SetImageProperty(msl_info->image[n],keyword,value,
+                msl_info->exception);
               break;
             }
             case 'P':
@@ -6050,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;
@@ -6062,14 +6129,14 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   geometry;
 
                 (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
-                image_option=GetImageOption(msl_info->image_info[n],"page");
+                image_option=GetImageArtifact(msl_info->image[n],"page");
                 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);
@@ -6078,13 +6145,15 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 break;
               }
               (void) SetMSLAttributes(msl_info,keyword,value);
-              (void) SetImageProperty(msl_info->image[n],keyword,value);
+              (void) SetImageProperty(msl_info->image[n],keyword,value,
+                msl_info->exception);
               break;
             }
             default:
             {
               (void) SetMSLAttributes(msl_info,keyword,value);
-              (void) SetImageProperty(msl_info->image[n],keyword,value);
+              (void) SetImageProperty(msl_info->image[n],keyword,value,
+                msl_info->exception);
               break;
             }
           }
@@ -6114,7 +6183,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6123,7 +6193,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"azimuth") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6136,7 +6206,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"elevation") == 0)
                     {
-                      geometry_info.sigma=InterpretLocaleValue(value,
+                      geometry_info.sigma=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6177,7 +6247,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           shade_image=ShadeImage(msl_info->image[n],gray,geometry_info.rho,
-            geometry_info.sigma,&msl_info->image[n]->exception);
+            geometry_info.sigma,msl_info->exception);
           if (shade_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6203,7 +6273,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6248,7 +6319,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry_info.xi=InterpretLocaleValue(value,
+                      geometry_info.xi=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6277,8 +6348,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           shadow_image=ShadowImage(msl_info->image[n],geometry_info.rho,
-            geometry_info.sigma,(ssize_t) ceil(geometry_info.xi-0.5),(ssize_t)
-            ceil(geometry_info.psi-0.5),&msl_info->image[n]->exception);
+            geometry_info.sigma,(ssize_t) ceil(geometry_info.xi-0.5),
+            (ssize_t) ceil(geometry_info.psi-0.5),msl_info->exception);
           if (shadow_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6287,7 +6358,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         }
       if (LocaleCompare((const char *) tag,"sharpen") == 0)
       {
-        double  radius = 0.0,
+        double 
+            radius = 0.0,
             sigma = 1.0;
 
         if (msl_info->image[n] == (Image *) NULL)
@@ -6305,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]));
+            msl_info->attributes[n],(const char *) attributes[i],exception));
           switch (*keyword)
           {
             case 'R':
@@ -6313,7 +6385,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword, "radius") == 0)
               {
-                radius = InterpretLocaleValue(value,(char **) NULL);
+                radius = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -6346,7 +6418,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         Image
           *newImage;
 
-        newImage=SharpenImage(msl_info->image[n],radius,sigma,&msl_info->image[n]->exception);
+        newImage=SharpenImage(msl_info->image[n],radius,sigma,
+          msl_info->exception);
         if (newImage == (Image *) NULL)
           break;
         msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6372,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]));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'G':
@@ -6432,7 +6505,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
 
 
         newImage=ShaveImage(msl_info->image[n], &rectInfo,
-          &msl_info->image[n]->exception);
+          msl_info->exception);
         if (newImage == (Image *) NULL)
           break;
         msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6460,7 +6533,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6469,8 +6543,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
-                      (void) QueryColorDatabase(value,
-                        &msl_info->image[n]->background_color,&exception);
+                      (void) QueryColorCompliance(value,AllCompliance,
+                        &msl_info->image[n]->background_color,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6496,7 +6570,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6525,7 +6599,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           shear_image=ShearImage(msl_info->image[n],geometry_info.rho,
-            geometry_info.sigma,&msl_info->image[n]->exception);
+            geometry_info.sigma,msl_info->exception);
           if (shear_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6548,7 +6622,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6560,7 +6635,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) SignatureImage(msl_info->image[n]);
+          (void) SignatureImage(msl_info->image[n],exception);
           break;
         }
       if (LocaleCompare((const char *) tag,"solarize") == 0)
@@ -6580,7 +6655,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6601,7 +6677,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"threshold") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6617,7 +6693,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) SolarizeImage(msl_info->image[n],geometry_info.rho);
+          (void) SolarizeImage(msl_info->image[n],geometry_info.rho,
+            msl_info->exception);
           break;
         }
       if (LocaleCompare((const char *) tag,"spread") == 0)
@@ -6639,7 +6716,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6662,7 +6740,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6678,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]->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]);
@@ -6689,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)
           {
@@ -6703,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]));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'I':
@@ -6714,7 +6793,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             for (j=0; j<msl_info->n;j++)
             {
               const char *
-                theAttr = GetImageProperty(msl_info->attributes[j], "id");
+                theAttr = GetImageProperty(msl_info->attributes[j], "id",
+                      exception);
               if (theAttr && LocaleCompare(theAttr, value) == 0)
               {
                 watermark = msl_info->image[j];
@@ -6742,7 +6822,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         Image
           *newImage;
 
-        newImage=SteganoImage(msl_info->image[n], watermark, &msl_info->image[n]->exception);
+        newImage=SteganoImage(msl_info->image[n], watermark, msl_info->exception);
         if (newImage == (Image *) NULL)
           break;
         msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6754,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)
           {
@@ -6767,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]));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'I':
@@ -6778,7 +6858,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             for (j=0; j<msl_info->n;j++)
             {
               const char *
-                theAttr = GetImageProperty(msl_info->attributes[j], "id");
+                theAttr = GetImageProperty(msl_info->attributes[j], "id",
+                      exception);
               if (theAttr && LocaleCompare(theAttr, value) == 0)
               {
                 stereoImage = msl_info->image[j];
@@ -6806,7 +6887,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         Image
           *newImage;
 
-        newImage=StereoImage(msl_info->image[n], stereoImage, &msl_info->image[n]->exception);
+        newImage=StereoImage(msl_info->image[n], stereoImage, msl_info->exception);
         if (newImage == (Image *) NULL)
           break;
         msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6815,6 +6896,30 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         } else
           ThrowMSLException(OptionError,"Missing stereo image",keyword);
       }
+      if (LocaleCompare((const char *) tag,"strip") == 0)
+        {
+          /*
+            Strip image.
+          */
+          if (msl_info->image[n] == (Image *) NULL)
+            {
+              ThrowMSLException(OptionError,"NoImagesDefined",
+                (const char *) tag);
+              break;
+            }
+          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);
+              CloneString(&value,attribute);
+              ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
+            }
+          (void) StripImage(msl_info->image[n],msl_info->exception);
+          break;
+        }
       if (LocaleCompare((const char *) tag,"swap") == 0)
         {
           Image
@@ -6839,7 +6944,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6876,8 +6982,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               ThrowMSLException(OptionError,"NoSuchImage",(const char *) tag);
               break;
             }
-          swap=CloneImage(p,0,0,MagickTrue,&p->exception);
-          ReplaceImageInList(&p,CloneImage(q,0,0,MagickTrue,&q->exception));
+          swap=CloneImage(p,0,0,MagickTrue,msl_info->exception);
+          ReplaceImageInList(&p,CloneImage(q,0,0,MagickTrue,
+            msl_info->exception));
           ReplaceImageInList(&q,swap);
           msl_info->image[n]=GetFirstImageInList(q);
           break;
@@ -6901,7 +7008,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6910,7 +7018,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"degrees") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6941,7 +7049,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           swirl_image=SwirlImage(msl_info->image[n],geometry_info.rho,
-            &msl_info->image[n]->exception);
+            msl_info->image[n]->interpolate,msl_info->exception);
           if (swirl_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -6964,7 +7072,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -6976,7 +7085,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) SyncImage(msl_info->image[n]);
+          (void) SyncImage(msl_info->image[n],exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
@@ -7004,7 +7113,8 @@ 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]);
+                msl_info->attributes[n],(const char *) attributes[i],
+                exception);
               CloneString(&value,attribute);
               switch (*keyword)
               {
@@ -7017,12 +7127,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                       const char
                         *attribute;
 
-                      attribute=GetImageProperty(msl_info->attributes[j],"id");
+                      attribute=GetImageProperty(msl_info->attributes[j],"id",
+                      exception);
                       if ((attribute != (const char *) NULL)  &&
                           (LocaleCompare(attribute,value) == 0))
                         {
                           texture_image=CloneImage(msl_info->image[j],0,0,
-                            MagickFalse,&exception);
+                            MagickFalse,exception);
                           break;
                         }
                     }
@@ -7036,7 +7147,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) TextureImage(msl_info->image[n],texture_image);
+          (void) TextureImage(msl_info->image[n],texture_image,exception);
           texture_image=DestroyImage(texture_image);
           break;
         }
@@ -7056,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]));
+          msl_info->attributes[n],(const char *) attributes[i],exception));
         switch (*keyword)
         {
           case 'T':
@@ -7064,7 +7175,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
           if (LocaleCompare(keyword,"threshold") == 0)
             {
-            threshold = InterpretLocaleValue(value,(char **) NULL);
+            threshold = StringToDouble(value,(char **) NULL);
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -7082,8 +7193,8 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           process image.
         */
         {
-          BilevelImage(msl_info->image[n],threshold);
-        break;
+          BilevelImage(msl_info->image[n],threshold,exception);
+          break;
         }
       }
       else if (LocaleCompare((const char *) tag, "transparent") == 0)
@@ -7099,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]));
+            msl_info->attributes[n],(const char *) attributes[i],exception));
           switch (*keyword)
           {
             case 'C':
@@ -7110,9 +7221,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 PixelInfo
                   target;
 
-                (void) QueryMagickColor(value,&target,&exception);
+                (void) QueryColorCompliance(value,AllCompliance,&target,
+                  exception);
                 (void) TransparentPaintImage(msl_info->image[n],&target,
-                  TransparentAlpha,MagickFalse,&msl_info->image[n]->exception);
+                  TransparentAlpha,MagickFalse,msl_info->exception);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -7148,7 +7260,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           rectInfo.height = rectInfo.width = 0;
           rectInfo.x =  rectInfo.y = 0;
 
-          newImage=CropImage(msl_info->image[n],&rectInfo, &msl_info->image[n]->exception);
+          newImage=CropImage(msl_info->image[n],&rectInfo, msl_info->exception);
           if (newImage == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -7175,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]));
+              msl_info->attributes[n],(const char *) attributes[i],exception));
             switch (*keyword)
             {
               case 'F':
@@ -7184,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);
@@ -7199,7 +7311,9 @@ static void MSLStartElement(void *context,const xmlChar *tag,
 
           /* process */
           {
-            (void) WriteImage(msl_info->image_info[n], msl_info->image[n]);
+            *msl_info->image_info[n]->magick='\0';
+            (void) WriteImage(msl_info->image_info[n], msl_info->image[n],
+              msl_info->exception);
             break;
           }
         }
@@ -7213,6 +7327,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
   }
   if ( value != NULL )
     value=DestroyString(value);
+  (void) DestroyExceptionInfo(exception);
   (void) LogMagickEvent(CoderEvent,GetMagickModule(),"  )");
 }
 
@@ -7243,7 +7358,7 @@ static void MSLEndElement(void *context,const xmlChar *tag)
             break;
           StripString(msl_info->content);
           (void) SetImageProperty(msl_info->image[n],"comment",
-            msl_info->content);
+            msl_info->content,msl_info->exception);
           break;
         }
       break;
@@ -7260,9 +7375,12 @@ static void MSLEndElement(void *context,const xmlChar *tag)
           while ( i-- )
           {
             if (msl_info->image[msl_info->n] != (Image *) NULL)
-              msl_info->image[msl_info->n]=DestroyImage(msl_info->image[msl_info->n]);
-            msl_info->attributes[msl_info->n]=DestroyImage(msl_info->attributes[msl_info->n]);
-            msl_info->image_info[msl_info->n]=DestroyImageInfo(msl_info->image_info[msl_info->n]);
+              msl_info->image[msl_info->n]=DestroyImage(
+                msl_info->image[msl_info->n]);
+            msl_info->attributes[msl_info->n]=DestroyImage(
+                msl_info->attributes[msl_info->n]);
+            msl_info->image_info[msl_info->n]=DestroyImageInfo(
+                msl_info->image_info[msl_info->n]);
             msl_info->n--;
           }
         }
@@ -7287,7 +7405,7 @@ static void MSLEndElement(void *context,const xmlChar *tag)
             break;
           StripString(msl_info->content);
           (void) SetImageProperty(msl_info->image[n],"label",
-            msl_info->content);
+            msl_info->content,msl_info->exception);
           break;
         }
       break;
@@ -7331,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';
@@ -7419,7 +7537,7 @@ static void MSLWarning(void *context,const char *format,...)
 {
   char
     *message,
-    reason[MaxTextExtent];
+    reason[MagickPathExtent];
 
   MSLInfo
     *msl_info;
@@ -7439,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);
@@ -7450,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;
@@ -7470,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);
@@ -7575,11 +7693,11 @@ static void MSLExternalSubset(void *context,const xmlChar *name,
 }
 #endif
 
-static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,Image **image,
-  ExceptionInfo *exception)
+static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,
+  Image **image,ExceptionInfo *exception)
 {
   char
-    message[MaxTextExtent];
+    message[MagickPathExtent];
 
   Image
     *msl_image;
@@ -7603,12 +7721,12 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,Image **im
     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(image != (Image **) NULL);
-  msl_image=AcquireImage(image_info);
+  msl_image=AcquireImage(image_info,exception);
   status=OpenBlob(image_info,msl_image,ReadBinaryBlobMode,exception);
   if (status == MagickFalse)
     {
@@ -7642,7 +7760,7 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,Image **im
       "UnableToInterpretMSLImage");
   *msl_info.image_info=CloneImageInfo(image_info);
   *msl_info.draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
-  *msl_info.attributes=AcquireImage(image_info);
+  *msl_info.attributes=AcquireImage(image_info,exception);
   msl_info.group_info[0].numImages=0;
   /* the first slot is used to point to the MSL file image */
   *msl_info.image=msl_image;
@@ -7696,12 +7814,11 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,Image **im
     (void) xmlParseChunk(msl_info.parser," ",1,MagickTrue);
   xmlFreeParserCtxt(msl_info.parser);
   (void) LogMagickEvent(CoderEvent,GetMagickModule(),"end SAX");
-  xmlCleanupParser();
   msl_info.group_info=(MSLGroupInfo *) RelinquishMagickMemory(
     msl_info.group_info);
   if (*image == (Image *) NULL)
     *image=(*msl_info.image);
-  if ((*msl_info.image)->exception.severity != UndefinedException)
+  if (msl_info.exception->severity != UndefinedException)
     return(MagickFalse);
   return(MagickTrue);
 }
@@ -7715,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));
@@ -7755,13 +7872,15 @@ ModuleExport size_t RegisterMSLImage(void)
   MagickInfo
     *entry;
 
-  entry=SetMagickInfo("MSL");
+#if defined(MAGICKCORE_XML_DELEGATE)
+  xmlInitParser();
+#endif
+  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);
 }
@@ -7853,14 +7972,20 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
           ssize_t
             alpha;
 
-          alpha=ParseCommandOption(MagickAlphaOptions,MagickFalse,value);
+          alpha=ParseCommandOption(MagickAlphaChannelOptions,MagickFalse,value);
           if (alpha < 0)
             ThrowMSLException(OptionError,"UnrecognizedType",value);
           if (image != (Image *) NULL)
-            (void) SetImageAlphaChannel(image,(AlphaChannelType) alpha,
+            (void) SetImageAlphaChannel(image,(AlphaChannelOption) alpha,
               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
@@ -7879,7 +8004,7 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(value,"unlimited") != 0)
-            limit=(MagickSizeType) SiPrefixToDouble(value,100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(value,100.0);
           (void) SetMagickResourceLimit(AreaResource,limit);
           break;
         }
@@ -7901,15 +8026,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
     {
       if (LocaleCompare(keyword,"background") == 0)
         {
-          (void) QueryColorDatabase(value,&image_info->background_color,
-            exception);
-          break;
-        }
-      if (LocaleCompare(keyword,"bias") == 0)
-        {
-          if (image == (Image *) NULL)
-            break;
-          image->bias=SiPrefixToDouble(value,QuantumRange);
+          (void) QueryColorCompliance(value,AllCompliance,
+            &image_info->background_color,exception);
           break;
         }
       if (LocaleCompare(keyword,"blue-primary") == 0)
@@ -7926,8 +8044,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
         }
       if (LocaleCompare(keyword,"bordercolor") == 0)
         {
-          (void) QueryColorDatabase(value,&image_info->border_color,
-            exception);
+          (void) QueryColorCompliance(value,AllCompliance,
+            &image_info->border_color,exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -7950,13 +8068,14 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
     {
       if (LocaleCompare(keyword,"fill") == 0)
         {
-          (void) QueryColorDatabase(value,&draw_info->fill,exception);
+          (void) QueryColorCompliance(value,AllCompliance,&draw_info->fill,
+            exception);
           (void) SetImageOption(image_info,keyword,value);
           break;
         }
       if (LocaleCompare(keyword,"filename") == 0)
         {
-          (void) CopyMagickString(image_info->filename,value,MaxTextExtent);
+          (void) CopyMagickString(image_info->filename,value,MagickPathExtent);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -7984,7 +8103,7 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
     {
       if (LocaleCompare(keyword,"id") == 0)
         {
-          (void) SetImageProperty(attributes,keyword,value);
+          (void) SetImageProperty(attributes,keyword,value,exception);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -7995,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) QueryColorDatabase(value,&image_info->matte_color,
-            exception);
+          (void) CopyMagickString(image_info->magick,value,MagickPathExtent);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -8012,8 +8125,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
     {
       if (LocaleCompare(keyword,"pointsize") == 0)
         {
-          image_info->pointsize=InterpretLocaleValue(value,(char **) NULL);
-          draw_info->pointsize=InterpretLocaleValue(value,(char **) NULL);
+          image_info->pointsize=StringToDouble(value,(char **) NULL);
+          draw_info->pointsize=StringToDouble(value,(char **) NULL);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -8042,7 +8155,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
         }
       if (LocaleCompare(keyword,"stroke") == 0)
         {
-          (void) QueryColorDatabase(value,&draw_info->stroke,exception);
+          (void) QueryColorCompliance(value,AllCompliance,&draw_info->stroke,
+            exception);
           (void) SetImageOption(image_info,keyword,value);
           break;
         }
@@ -8081,6 +8195,9 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
 ModuleExport void UnregisterMSLImage(void)
 {
   (void) UnregisterMagickInfo("MSL");
+#if defined(MAGICKCORE_XML_DELEGATE)
+  xmlCleanupParser();
+#endif
 }
 \f
 #if defined(MAGICKCORE_XML_DELEGATE)
@@ -8099,7 +8216,8 @@ ModuleExport void UnregisterMSLImage(void)
 %
 %  The format of the WriteMSLImage method is:
 %
-%      MagickBooleanType WriteMSLImage(const ImageInfo *image_info,Image *image)
+%      MagickBooleanType WriteMSLImage(const ImageInfo *image_info,
+%        Image *image,ExceptionInfo *exception)
 %
 %  A description of each parameter follows.
 %
@@ -8107,17 +8225,20 @@ ModuleExport void UnregisterMSLImage(void)
 %
 %    o image:  The image.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
-static MagickBooleanType WriteMSLImage(const ImageInfo *image_info,Image *image)
+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);
-  (void) ProcessMSLScript(image_info,&image,&image->exception);
+  (void) ProcessMSLScript(image_info,&image,exception);
   return(MagickTrue);
 }
 #endif