/*
Include declarations.
*/
-#include "magick/studio.h"
-#include "magick/annotate.h"
-#include "magick/artifact.h"
-#include "magick/blob.h"
-#include "magick/blob-private.h"
-#include "magick/cache.h"
-#include "magick/cache-view.h"
-#include "magick/color.h"
-#include "magick/colormap.h"
-#include "magick/color-private.h"
-#include "magick/composite.h"
-#include "magick/constitute.h"
-#include "magick/decorate.h"
-#include "magick/display.h"
-#include "magick/draw.h"
-#include "magick/effect.h"
-#include "magick/enhance.h"
-#include "magick/exception.h"
-#include "magick/exception-private.h"
-#include "magick/fx.h"
-#include "magick/geometry.h"
-#include "magick/image.h"
-#include "magick/image-private.h"
-#include "magick/list.h"
-#include "magick/log.h"
-#include "magick/magick.h"
-#include "magick/memory_.h"
-#include "magick/module.h"
-#include "magick/option.h"
-#include "magick/paint.h"
-#include "magick/profile.h"
-#include "magick/property.h"
-#include "magick/quantize.h"
-#include "magick/quantum-private.h"
-#include "magick/registry.h"
-#include "magick/resize.h"
-#include "magick/resource_.h"
-#include "magick/segment.h"
-#include "magick/shear.h"
-#include "magick/signature.h"
-#include "magick/static.h"
-#include "magick/string_.h"
-#include "magick/string-private.h"
-#include "magick/transform.h"
-#include "magick/threshold.h"
-#include "magick/utility.h"
+#include "MagickCore/studio.h"
+#include "MagickCore/annotate.h"
+#include "MagickCore/artifact.h"
+#include "MagickCore/blob.h"
+#include "MagickCore/blob-private.h"
+#include "MagickCore/cache.h"
+#include "MagickCore/cache-view.h"
+#include "MagickCore/color.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/draw.h"
+#include "MagickCore/effect.h"
+#include "MagickCore/enhance.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/exception-private.h"
+#include "MagickCore/fx.h"
+#include "MagickCore/geometry.h"
+#include "MagickCore/image.h"
+#include "MagickCore/image-private.h"
+#include "MagickCore/list.h"
+#include "MagickCore/log.h"
+#include "MagickCore/magick.h"
+#include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
+#include "MagickCore/option.h"
+#include "MagickCore/paint.h"
+#include "MagickCore/pixel-accessor.h"
+#include "MagickCore/profile.h"
+#include "MagickCore/property.h"
+#include "MagickCore/quantize.h"
+#include "MagickCore/quantum-private.h"
+#include "MagickCore/registry.h"
+#include "MagickCore/resize.h"
+#include "MagickCore/resource_.h"
+#include "MagickCore/segment.h"
+#include "MagickCore/shear.h"
+#include "MagickCore/signature.h"
+#include "MagickCore/static.h"
+#include "MagickCore/string_.h"
+#include "MagickCore/string-private.h"
+#include "MagickCore/transform.h"
+#include "MagickCore/threshold.h"
+#include "MagickCore/utility.h"
#if defined(MAGICKCORE_XML_DELEGATE)
# if defined(MAGICKCORE_WINDOWS_SUPPORT)
# if defined(__MINGW32__)
*/
#if defined(MAGICKCORE_XML_DELEGATE)
static MagickBooleanType
- WriteMSLImage(const ImageInfo *,Image *);
+ WriteMSLImage(const ImageInfo *,Image *,ExceptionInfo *);
static MagickBooleanType
SetMSLAttributes(MSLInfo *,const char *,const char *);
ImageInfo
*read_info;
- (void) FormatMagickString(key,MaxTextExtent,"cache:%s",path);
+ (void) FormatLocaleString(key,MaxTextExtent,"cache:%s",path);
sans_exception=AcquireExceptionInfo();
image=(Image *) GetImageRegistry(ImageRegistryType,key,sans_exception);
sans_exception=DestroyExceptionInfo(sans_exception);
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],
+ &image->exception);
else
msl_info->attributes[n]=CloneImage(image,0,0,MagickTrue,&image->exception);
msl_info->image[n]=(Image *) image;
ChannelType
channel;
+ ChannelType
+ channel_mask;
+
char
key[MaxTextExtent],
*value;
{
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)
{
}
}
}
- noise_image=AddNoiseImageChannel(msl_info->image[n],channel,noise,
+ 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);
if (noise_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
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)
{
*p;
p=value;
- draw_info->affine.sx=strtod(p,&p);
+ draw_info->affine.sx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.rx=strtod(p,&p);
+ draw_info->affine.rx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.ry=strtod(p,&p);
+ draw_info->affine.ry=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.sy=strtod(p,&p);
+ draw_info->affine.sy=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.tx=strtod(p,&p);
+ draw_info->affine.tx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.ty=strtod(p,&p);
+ draw_info->affine.ty=InterpretLocaleValue(p,&p);
break;
}
if (LocaleCompare(keyword,"align") == 0)
{
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)
{
if (LocaleCompare(keyword,"geometry") == 0)
{
- flags=ParsePageGeometry(msl_info->image[n],value,
+ flags=ParseGravityGeometry(msl_info->image[n],value,
&geometry,&exception);
- if ((flags & HeightValue) == 0)
- geometry.height=geometry.width;
break;
}
if (LocaleCompare(keyword,"gravity") == 0)
{
- option=ParseCommandOption(MagickGravityOptions,MagickFalse,
- value);
+ option=ParseCommandOption(MagickGravityOptions,
+ MagickFalse,value);
if (option < 0)
ThrowMSLException(OptionError,"UnrecognizedGravityType",
value);
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=StringToDouble(value);
+ draw_info->pointsize=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"rotate") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(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))));
}
if (LocaleCompare(keyword,"skewX") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(value,(char **) NULL);
affine.ry=tan(DegreesToRadians(fmod((double) angle,
360.0)));
break;
}
if (LocaleCompare(keyword,"skewY") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(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);
}
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)
{
if (LocaleCompare(keyword, "undercolor") == 0)
{
- (void) QueryColorDatabase(value,&draw_info->undercolor,
- &exception);
+ (void) QueryColorCompliance(value,AllCompliance,
+ &draw_info->undercolor,&exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,
+ (void) FormatLocaleString(text,MaxTextExtent,
"%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
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->image[n]->exception);
draw_info=DestroyDrawInfo(draw_info);
break;
}
{
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)
{
{
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)
{
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- blur_image=BlurImageChannel(msl_info->image[n],channel,
- geometry_info.rho,geometry_info.sigma,
+ channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
+ blur_image=BlurImage(msl_info->image[n],geometry_info.rho,
+ geometry_info.sigma,geometry_info.xi,
&msl_info->image[n]->exception);
+ (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
if (blur_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
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)
{
{
if (LocaleCompare(keyword, "fill") == 0)
{
- (void) QueryColorDatabase(value,
+ (void) QueryColorCompliance(value,AllCompliance,
&msl_info->image[n]->border_color,&exception);
break;
}
}
}
border_image=BorderImage(msl_info->image[n],&geometry,
- &msl_info->image[n]->exception);
+ msl_info->image[n]->compose,&msl_info->image[n]->exception);
if (border_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
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)
{
{
if (LocaleCompare(keyword,"fill") == 0)
{
- (void) QueryColorDatabase(value,&target,
+ (void) QueryColorCompliance(value,AllCompliance,&target,
&msl_info->image[n]->exception);
break;
}
}
if (LocaleCompare((const char *) tag, "charcoal") == 0)
{
- double radius = 0.0,
+ double bias = 0.0,
+ radius = 0.0,
sigma = 1.0;
if (msl_info->image[n] == (Image *) NULL)
{
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':
+ case 'b':
+ {
+ if (LocaleCompare(keyword, "bias") == 0)
+ {
+ bias = InterpretLocaleValue(value,(char **) NULL);
+ break;
+ }
+ ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
+ break;
+ }
case 'R':
case 'r':
{
if (LocaleCompare(keyword, "radius") == 0)
{
- radius = StringToDouble( value );
+ radius = InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
Image
*newImage;
- newImage=CharcoalImage(msl_info->image[n],radius,sigma,
+ newImage=CharcoalImage(msl_info->image[n],radius,sigma,bias,
&msl_info->image[n]->exception);
if (newImage == (Image *) NULL)
break;
{
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)
{
PaintMethod
paint_method;
- MagickPixelPacket
+ PixelInfo
target;
/*
{
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)
{
{
if (LocaleCompare(keyword,"bordercolor") == 0)
{
- (void) QueryMagickColor(value,&target,&exception);
+ (void) QueryMagickColorCompliance(value,AllCompliance,
+ &target,&exception);
paint_method=FillToBorderMethod;
break;
}
{
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=StringToDouble(value);
+ msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) FloodfillPaintImage(msl_info->image[n],DefaultChannels,
- draw_info,&target,geometry.x,geometry.y,
- paint_method == FloodfillMethod ? MagickFalse : MagickTrue);
+ (void) FloodfillPaintImage(msl_info->image[n],draw_info,&target,
+ geometry.x,geometry.y,paint_method == FloodfillMethod ?
+ MagickFalse : MagickTrue,&msl_info->image[n]->exception);
draw_info=DestroyDrawInfo(draw_info);
break;
}
{
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)
{
{
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)
{
}
if (LocaleCompare(keyword, "color") == 0)
{
- (void) QueryColorDatabase(value,
+ (void) QueryColorCompliance(value,AllCompliance,
&composite_image->background_color,&exception);
break;
}
if ((attribute != (const char *) NULL) &&
(LocaleCompare(value,value) == 0))
{
- SetImageType(composite_image,TrueColorMatteType);
+ SetImageType(composite_image,TrueColorMatteType,
+ &exception);
(void) CompositeImage(composite_image,
CopyOpacityCompositeOp,msl_info->image[j],0,0);
break;
register ssize_t
x;
- register PixelPacket
+ register Quantum
*q;
CacheView
*composite_view;
- opacity=QuantumRange-StringToLong(value);
+ opacity=StringToLong(value);
if (compose != DissolveCompositeOp)
{
(void) SetImageOpacity(composite_image,(Quantum)
(void) SetImageArtifact(msl_info->image[n],
"compose:args",value);
if (composite_image->matte != MagickTrue)
- (void) SetImageOpacity(composite_image,OpaqueOpacity);
+ (void) SetImageOpacity(composite_image,OpaqueAlpha);
composite_view=AcquireCacheView(composite_image);
for (y=0; y < (ssize_t) composite_image->rows ; y++)
{
- q=GetCacheViewAuthenticPixels(composite_view,0,y,(ssize_t)
- composite_image->columns,1,&exception);
+ q=GetCacheViewAuthenticPixels(composite_view,0,y,
+ (ssize_t) composite_image->columns,1,&exception);
for (x=0; x < (ssize_t) composite_image->columns; x++)
{
- if (q->opacity == OpaqueOpacity)
- q->opacity=ClampToQuantum(opacity);
- q++;
+ if (GetPixelAlpha(composite_image,q) == OpaqueAlpha)
+ SetPixelAlpha(composite_image,
+ ClampToQuantum(opacity),q);
+ q+=GetPixelChannels(composite_image);
}
if (SyncCacheViewAuthenticPixels(composite_view,&exception) == MagickFalse)
break;
{
if (LocaleCompare(keyword,"rotate") == 0)
{
- rotate_image=RotateImage(composite_image,StringToDouble(value),
- &exception);
+ rotate_image=RotateImage(composite_image,
+ InterpretLocaleValue(value,(char **) NULL),&exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
image=msl_info->image[n];
- (void) FormatMagickString(composite_geometry,MaxTextExtent,
+ (void) FormatLocaleString(composite_geometry,MaxTextExtent,
"%.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);
if (rotate_image == (Image *) NULL)
- CompositeImageChannel(image,channel,compose,composite_image,
- geometry.x,geometry.y);
+ CompositeImage(image,compose,composite_image,geometry.x,geometry.y);
else
{
/*
geometry.x-=(ssize_t) (rotate_image->columns-
composite_image->columns)/2;
geometry.y-=(ssize_t) (rotate_image->rows-composite_image->rows)/2;
- CompositeImageChannel(image,channel,compose,rotate_image,
- geometry.x,geometry.y);
+ CompositeImage(image,compose,rotate_image,geometry.x,geometry.y);
rotate_image=DestroyImage(rotate_image);
}
+ (void) SetPixelChannelMask(image,channel_mask);
composite_image=DestroyImage(composite_image);
break;
}
{
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)
{
}
}
}
- (void) ContrastImage(msl_info->image[n],sharpen);
+ (void) ContrastImage(msl_info->image[n],sharpen,
+ &msl_info->image[n]->exception);
break;
}
if (LocaleCompare((const char *) tag,"crop") == 0)
{
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)
{
{
if (LocaleCompare(keyword,"geometry") == 0)
{
- flags=ParsePageGeometry(msl_info->image[n],value,
+ flags=ParseGravityGeometry(msl_info->image[n],value,
&geometry,&exception);
- if ((flags & HeightValue) == 0)
- geometry.height=geometry.width;
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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)
{
}
}
}
- (void) CycleColormapImage(msl_info->image[n],display);
+ (void) CycleColormapImage(msl_info->image[n],display,&exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) 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);
}
{
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)
{
}
}
}
- (void) DisplayImages(msl_info->image_info[n],msl_info->image[n]);
+ (void) DisplayImages(msl_info->image_info[n],msl_info->image[n],
+ &msl_info->image[n]->exception);
break;
}
if (LocaleCompare((const char *) tag,"draw") == 0)
{
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)
{
*p;
p=value;
- draw_info->affine.sx=strtod(p,&p);
+ draw_info->affine.sx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.rx=strtod(p,&p);
+ draw_info->affine.rx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.ry=strtod(p,&p);
+ draw_info->affine.ry=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.sy=strtod(p,&p);
+ draw_info->affine.sy=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.tx=strtod(p,&p);
+ draw_info->affine.tx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.ty=strtod(p,&p);
+ draw_info->affine.ty=InterpretLocaleValue(p,&p);
break;
}
if (LocaleCompare(keyword,"align") == 0)
{
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)
}
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=StringToDouble(value);
+ draw_info->pointsize=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"rotate") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(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))));
}
if (LocaleCompare(keyword,"skewX") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(value,(char **) NULL);
affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
break;
}
if (LocaleCompare(keyword,"skewY") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(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);
}
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)
{
if (LocaleCompare(keyword, "undercolor") == 0)
{
- (void) QueryColorDatabase(value,&draw_info->undercolor,
- &exception);
+ (void) QueryColorCompliance(value,AllCompliance,
+ &draw_info->undercolor,&exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,
+ (void) FormatLocaleString(text,MaxTextExtent,
"%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
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;
}
{
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)
{
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
edge_image=EdgeImage(msl_info->image[n],geometry_info.rho,
- &msl_info->image[n]->exception);
+ geometry_info.sigma,&msl_info->image[n]->exception);
if (edge_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
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)
{
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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);
}
{
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)
{
}
}
}
- (void) EqualizeImage(msl_info->image[n]);
+ (void) EqualizeImage(msl_info->image[n],
+ &msl_info->image[n]->exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) 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);
}
{
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);
}
{
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)
{
{
if (LocaleCompare(keyword, "fill") == 0)
{
- (void) QueryColorDatabase(value,
+ (void) QueryColorCompliance(value,AllCompliance,
&msl_info->image[n]->matte_color,&exception);
break;
}
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->image[n]->exception);
if (frame_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
char
gamma[MaxTextExtent];
- MagickPixelPacket
+ PixelInfo
pixel;
/*
{
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)
{
{
if (LocaleCompare(keyword,"blue") == 0)
{
- pixel.blue=StringToDouble(value);
+ pixel.blue=InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare(keyword,"green") == 0)
{
- pixel.green=StringToDouble(value);
+ pixel.green=InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"red") == 0)
{
- pixel.red=StringToDouble(value);
+ pixel.red=InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
if (*gamma == '\0')
- (void) FormatMagickString(gamma,MaxTextExtent,"%g,%g,%g",
+ (void) FormatLocaleString(gamma,MaxTextExtent,"%g,%g,%g",
(double) pixel.red,(double) pixel.green,(double) pixel.blue);
- switch (channel)
- {
- default:
- {
- (void) GammaImage(msl_info->image[n],gamma);
- break;
- }
- case RedChannel:
- {
- (void) GammaImageChannel(msl_info->image[n],RedChannel,pixel.red);
- break;
- }
- case GreenChannel:
- {
- (void) GammaImageChannel(msl_info->image[n],GreenChannel,
- pixel.green);
- break;
- }
- case BlueChannel:
- {
- (void) GammaImageChannel(msl_info->image[n],BlueChannel,
- pixel.blue);
- break;
- }
- }
+ (void) GammaImage(msl_info->image[n],atof(gamma),
+ &msl_info->image[n]->exception);
break;
}
else if (LocaleCompare((const char *) tag,"get") == 0)
{
if (LocaleCompare(keyword,"height") == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
(double) msl_info->image[n]->rows);
(void) SetImageProperty(msl_info->attributes[n],key,value);
break;
{
if (LocaleCompare(keyword,"width") == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
(double) msl_info->image[n]->columns);
(void) SetImageProperty(msl_info->attributes[n],key,value);
break;
{
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':
{
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)
{
{
if (LocaleCompare(keyword,"amount") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
implode_image=ImplodeImage(msl_info->image[n],geometry_info.rho,
- &msl_info->image[n]->exception);
+ msl_info->image[n]->interpolate,&msl_info->image[n]->exception);
if (implode_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
if (LocaleCompare(keyword,"black") == 0)
{
- levelBlack = StringToDouble( value );
+ levelBlack = InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- levelGamma = StringToDouble( value );
+ levelGamma = InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"white") == 0)
{
- levelWhite = StringToDouble( value );
+ levelWhite = InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
}
/* process image */
- {
- char level[MaxTextExtent + 1];
- (void) FormatMagickString(level,MaxTextExtent,"%3.6f/%3.6f/%3.6f/",
- levelBlack,levelGamma,levelWhite);
- LevelImage ( msl_info->image[n], level );
- break;
- }
+ LevelImage(msl_info->image[n],levelBlack,levelWhite,levelGamma,
+ &msl_info->image[n]->exception);
+ break;
}
}
case 'M':
{
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);
}
{
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)
{
quantize_info=AcquireQuantizeInfo(msl_info->image_info[n]);
quantize_info->dither=dither;
(void) RemapImages(quantize_info,msl_info->image[n],
- affinity_image);
+ affinity_image,&exception);
quantize_info=DestroyQuantizeInfo(quantize_info);
affinity_image=DestroyImage(affinity_image);
break;
double
opacity;
- MagickPixelPacket
+ PixelInfo
target;
PaintMethod
{
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)
{
{
if (LocaleCompare(keyword,"bordercolor") == 0)
{
- (void) QueryMagickColor(value,&target,&exception);
+ (void) QueryMagickColorCompliance(value,AllCompliance,
+ &target,&exception);
paint_method=FillToBorderMethod;
break;
}
{
if (LocaleCompare(keyword,"fuzz") == 0)
{
- msl_info->image[n]->fuzz=StringToDouble(value);
+ msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"opacity") == 0)
{
- opacity=StringToDouble(value);
+ opacity=InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
draw_info=CloneDrawInfo(msl_info->image_info[n],
msl_info->draw_info[n]);
- draw_info->fill.opacity=ClampToQuantum(opacity);
- (void) FloodfillPaintImage(msl_info->image[n],OpacityChannel,
- draw_info,&target,geometry.x,geometry.y,
- paint_method == FloodfillMethod ? MagickFalse : MagickTrue);
+ draw_info->fill.alpha=ClampToQuantum(opacity);
+ channel_mask=SetPixelChannelMask(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);
draw_info=DestroyDrawInfo(draw_info);
break;
}
{
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)
{
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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);
}
{
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)
{
{
if (LocaleCompare(keyword,"blackness") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
if (LocaleCompare(keyword,"brightness") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"hue") == 0)
{
- geometry_info.xi=StringToDouble(value);
+ geometry_info.xi=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"lightness") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"saturation") == 0)
{
- geometry_info.sigma=StringToDouble(value);
+ geometry_info.sigma=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"whiteness") == 0)
{
- geometry_info.sigma=StringToDouble(value);
+ geometry_info.sigma=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) FormatMagickString(modulate,MaxTextExtent,"%g,%g,%g",
+ (void) FormatLocaleString(modulate,MaxTextExtent,"%g,%g,%g",
geometry_info.rho,geometry_info.sigma,geometry_info.xi);
- (void) ModulateImage(msl_info->image[n],modulate);
+ (void) ModulateImage(msl_info->image[n],modulate,
+ &msl_info->image[n]->exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) 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)
{
}
}
}
- (void) NegateImageChannel(msl_info->image[n],channel,gray);
+ channel_mask=SetPixelChannelMask(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);
break;
}
if (LocaleCompare((const char *) tag,"normalize") == 0)
{
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)
{
}
}
}
- (void) NormalizeImageChannel(msl_info->image[n],channel);
+ (void) NormalizeImage(msl_info->image[n],
+ &msl_info->image[n]->exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) 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)
{
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
paint_image=OilPaintImage(msl_info->image[n],geometry_info.rho,
- &msl_info->image[n]->exception);
+ geometry_info.sigma,&msl_info->image[n]->exception);
if (paint_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
}
if (LocaleCompare((const char *) tag,"opaque") == 0)
{
- MagickPixelPacket
+ PixelInfo
fill_color,
target;
(const char *) tag);
break;
}
- (void) QueryMagickColor("none",&target,&exception);
- (void) QueryMagickColor("none",&fill_color,&exception);
+ (void) QueryMagickColorCompliance("none",AllCompliance,&target,
+ &exception);
+ (void) QueryMagickColorCompliance("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)
{
{
if (LocaleCompare(keyword,"fill") == 0)
{
- (void) QueryMagickColor(value,&fill_color,&exception);
+ (void) QueryMagickColorCompliance(value,AllCompliance,
+ &fill_color,&exception);
break;
}
if (LocaleCompare(keyword,"fuzz") == 0)
{
- msl_info->image[n]->fuzz=StringToDouble(value);
+ msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) OpaquePaintImageChannel(msl_info->image[n],channel,
- &target,&fill_color,MagickFalse);
+ channel_mask=SetPixelChannelMask(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);
break;
}
ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) 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)
{
{
if (LocaleCompare(keyword,"output") == 0)
{
- (void) fprintf(stdout,"%s",value);
+ (void) FormatLocaleFile(stdout,"%s",value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
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 == '+')
{
{
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)
{
}
}
}
- (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)
{
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)
{
*p;
p=value;
- draw_info->affine.sx=strtod(p,&p);
+ draw_info->affine.sx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.rx=strtod(p,&p);
+ draw_info->affine.rx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.ry=strtod(p,&p);
+ draw_info->affine.ry=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.sy=strtod(p,&p);
+ draw_info->affine.sy=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.tx=strtod(p,&p);
+ draw_info->affine.tx=InterpretLocaleValue(p,&p);
if (*p ==',')
p++;
- draw_info->affine.ty=strtod(p,&p);
+ draw_info->affine.ty=InterpretLocaleValue(p,&p);
break;
}
if (LocaleCompare(keyword,"align") == 0)
{
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)
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=StringToDouble(value);
+ draw_info->pointsize=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"rotate") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(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))));
}
if (LocaleCompare(keyword,"skewX") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(value,(char **) NULL);
affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
break;
}
if (LocaleCompare(keyword,"skewY") == 0)
{
- angle=StringToDouble(value);
+ angle=InterpretLocaleValue(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);
}
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)
{
if (LocaleCompare(keyword, "undercolor") == 0)
{
- (void) QueryColorDatabase(value,&draw_info->undercolor,
- &exception);
+ (void) QueryColorCompliance(value,AllCompliance,
+ &draw_info->undercolor,&exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,
+ (void) FormatLocaleString(text,MaxTextExtent,
"%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
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->image[n]->exception);
if (status != MagickFalse)
{
Image
{
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)
{
}
}
}
- (void) RaiseImage(msl_info->image[n],&geometry,raise);
+ (void) RaiseImage(msl_info->image[n],&geometry,raise,
+ &msl_info->image[n]->exception);
break;
}
if (LocaleCompare((const char *) tag,"read") == 0)
{
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':
{
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)
{
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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':
{
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=StringToDouble(value);
+ msl_info->image[n]->blur=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"x-resolution") == 0)
{
- x_resolution=StringToDouble(value);
+ x_resolution=InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"y-resolution") == 0)
{
- y_resolution=StringToDouble(value);
+ y_resolution=InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
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)
{
{
if (LocaleCompare(keyword,"support") == 0)
{
- blur=StringToDouble(value);
+ blur=InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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)
{
{
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':
{
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)
{
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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':
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- degrees = StringToDouble( value );
+ degrees = InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
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)
{
{
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)
{
{
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)
{
{
if (LocaleCompare(keyword,"cluster-threshold") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
if (LocaleCompare(keyword,"colorspace") == 0)
{
if (LocaleCompare(keyword,"smoothing-threshold") == 0)
{
- geometry_info.sigma=StringToDouble(value);
+ geometry_info.sigma=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
(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)
{
if (msl_info->image[n] == (Image *) NULL)
{
- ThrowMSLException(OptionError,"NoImagesDefined",
- (const char *) tag);
+ ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag);
break;
}
{
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':
property=GetImageProperty(msl_info->attributes[j],"id");
if (LocaleCompare(property,value) == 0)
{
- SetImageMask(msl_info->image[n],msl_info->image[j]);
+ SetImageMask(msl_info->image[n],msl_info->image[j],
+ &exception);
break;
}
}
property=GetImageProperty(msl_info->attributes[j],"id");
if (LocaleCompare(property,value) == 0)
{
- SetImageClipMask(msl_info->image[n],msl_info->image[j]);
+ SetImageClipMask(msl_info->image[n],msl_info->image[j],
+ &exception);
break;
}
}
break;
}
(void) SetMSLAttributes(msl_info,keyword,value);
+ (void) SetImageProperty(msl_info->image[n],keyword,value);
break;
}
case 'D':
break;
}
(void) SetMSLAttributes(msl_info,keyword,value);
+ (void) SetImageProperty(msl_info->image[n],keyword,value);
break;
}
case 'O':
{
if (LocaleCompare(keyword, "opacity") == 0)
{
- ssize_t opac = OpaqueOpacity,
+ ssize_t opac = OpaqueAlpha,
len = (ssize_t) strlen( value );
if (value[len-1] == '%') {
break;
}
(void) SetMSLAttributes(msl_info,keyword,value);
+ (void) SetImageProperty(msl_info->image[n],keyword,value);
break;
}
case 'P':
if (image_option != (const char *) NULL)
flags=ParseAbsoluteGeometry(image_option,&geometry);
flags=ParseAbsoluteGeometry(value,&geometry);
- (void) FormatMagickString(page,MaxTextExtent,"%.20gx%.20g",
+ (void) FormatLocaleString(page,MaxTextExtent,"%.20gx%.20g",
(double) geometry.width,(double) geometry.height);
if (((flags & XValue) != 0) || ((flags & YValue) != 0))
- (void) FormatMagickString(page,MaxTextExtent,
+ (void) FormatLocaleString(page,MaxTextExtent,
"%.20gx%.20g%+.20g%+.20g",(double) geometry.width,
(double) geometry.height,(double) geometry.x,(double)
geometry.y);
break;
}
(void) SetMSLAttributes(msl_info,keyword,value);
+ (void) SetImageProperty(msl_info->image[n],keyword,value);
break;
}
default:
{
(void) SetMSLAttributes(msl_info,keyword,value);
+ (void) SetImageProperty(msl_info->image[n],keyword,value);
break;
}
}
{
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)
{
{
if (LocaleCompare(keyword,"azimuth") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"elevation") == 0)
{
- geometry_info.sigma=StringToDouble(value);
+ geometry_info.sigma=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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)
{
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry_info.xi=StringToDouble(value);
+ geometry_info.xi=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare((const char *) tag,"sharpen") == 0)
{
- double radius = 0.0,
+ double bias = 0.0,
+ radius = 0.0,
sigma = 1.0;
if (msl_info->image[n] == (Image *) NULL)
{
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':
+ case 'b':
+ {
+ if (LocaleCompare(keyword, "bias") == 0)
+ {
+ bias = InterpretLocaleValue(value,(char **) NULL);
+ break;
+ }
+ ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
+ break;
+ }
case 'R':
case 'r':
{
if (LocaleCompare(keyword, "radius") == 0)
{
- radius = StringToDouble( value );
+ radius = InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
Image
*newImage;
- newImage=SharpenImage(msl_info->image[n],radius,sigma,&msl_info->image[n]->exception);
+ newImage=SharpenImage(msl_info->image[n],radius,sigma,bias,
+ &msl_info->image[n]->exception);
if (newImage == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
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':
{
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)
{
{
if (LocaleCompare(keyword, "fill") == 0)
{
- (void) QueryColorDatabase(value,
+ (void) QueryColorCompliance(value,AllCompliance,
&msl_info->image[n]->background_color,&exception);
break;
}
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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)
{
}
}
}
- (void) SignatureImage(msl_info->image[n]);
+ (void) SignatureImage(msl_info->image[n],&exception);
break;
}
if (LocaleCompare((const char *) tag,"solarize") == 0)
{
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)
{
{
if (LocaleCompare(keyword,"threshold") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) SolarizeImage(msl_info->image[n],geometry_info.rho);
+ (void) SolarizeImage(msl_info->image[n],geometry_info.rho,
+ &msl_info->image[n]->exception);
break;
}
if (LocaleCompare((const char *) tag,"spread") == 0)
{
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)
{
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
spread_image=SpreadImage(msl_info->image[n],geometry_info.rho,
- &msl_info->image[n]->exception);
+ msl_info->image[n]->interpolate,&msl_info->image[n]->exception);
if (spread_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
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':
{
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':
{
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)
{
{
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)
{
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- geometry_info.rho=StringToDouble(value);
+ geometry_info.rho=InterpretLocaleValue(value,
+ (char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
swirl_image=SwirlImage(msl_info->image[n],geometry_info.rho,
- &msl_info->image[n]->exception);
+ msl_info->image[n]->interpolate,&msl_info->image[n]->exception);
if (swirl_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
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)
{
{
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)
{
{
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':
{
if (LocaleCompare(keyword,"threshold") == 0)
{
- threshold = StringToDouble( value );
+ threshold = InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
process image.
*/
{
- BilevelImageChannel(msl_info->image[n],
- (ChannelType) ((ssize_t) (CompositeChannels &~ (ssize_t) OpacityChannel)),
- threshold);
+ BilevelImage(msl_info->image[n],threshold);
break;
}
}
{
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':
{
if (LocaleCompare(keyword,"color") == 0)
{
- MagickPixelPacket
+ PixelInfo
target;
- (void) QueryMagickColor(value,&target,&exception);
+ (void) QueryMagickColorCompliance(value,AllCompliance,&target,
+ &exception);
(void) TransparentPaintImage(msl_info->image[n],&target,
- TransparentOpacity,MagickFalse);
+ TransparentAlpha,MagickFalse,&msl_info->image[n]->exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
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':
/* process */
{
- (void) WriteImage(msl_info->image_info[n], msl_info->image[n]);
+ (void) WriteImage(msl_info->image_info[n], msl_info->image[n],
+ &msl_info->image[n]->exception);
break;
}
}
else
{
msl_info->content=(char *) NULL;
- if (~length >= MaxTextExtent)
+ if (~length >= (MaxTextExtent-1))
msl_info->content=(char *) AcquireQuantumMemory(length+MaxTextExtent,
sizeof(*msl_info->content));
if (msl_info->content != (char *) NULL)
(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)
{
"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;
if (alpha < 0)
ThrowMSLException(OptionError,"UnrecognizedType",value);
if (image != (Image *) NULL)
- (void) SetImageAlphaChannel(image,(AlphaChannelType) alpha);
+ (void) SetImageAlphaChannel(image,(AlphaChannelType) alpha,
+ exception);
break;
}
if (LocaleCompare(keyword,"antialias") == 0)
{
if (LocaleCompare(keyword,"background") == 0)
{
- (void) QueryColorDatabase(value,&image_info->background_color,
- exception);
+ (void) QueryColorCompliance(value,AllCompliance,
+ &image_info->background_color,exception);
break;
}
if (LocaleCompare(keyword,"bias") == 0)
}
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);
{
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,"mattecolor") == 0)
{
- (void) QueryColorDatabase(value,&image_info->matte_color,
- exception);
+ (void) QueryColorCompliance(value,AllCompliance,
+ &image_info->matte_color,exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- image_info->pointsize=StringToDouble(value);
- draw_info->pointsize=StringToDouble(value);
+ image_info->pointsize=InterpretLocaleValue(value,(char **) NULL);
+ draw_info->pointsize=InterpretLocaleValue(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",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;
}
%
% 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.
%
%
% 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);
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