% December 2001 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 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/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"
#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"
channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
noise_image=AddNoiseImage(msl_info->image[n],noise,1.0,
msl_info->exception);
- (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+ (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
if (noise_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
*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)
}
if (LocaleCompare(keyword,"antialias") == 0)
{
- option=ParseCommandOption(MagickBooleanOptions,MagickFalse,
- value);
+ option=ParseCommandOption(MagickBooleanOptions,
+ MagickFalse,value);
if (option < 0)
ThrowMSLException(OptionError,"UnrecognizedBooleanType",
value);
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=InterpretLocaleValue(value,
- (char **) NULL);
+ draw_info->pointsize=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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))));
}
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,"radius") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
- (char **) NULL);
+ geometry_info.rho=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
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->exception);
- (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+ geometry_info.sigma,msl_info->exception);
+ (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
if (blur_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
}
if (LocaleCompare((const char *) tag, "charcoal") == 0)
{
- double bias = 0.0,
+ double
radius = 0.0,
sigma = 1.0;
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)
+ if (LocaleCompare(keyword,"radius") == 0)
{
- radius = InterpretLocaleValue(value,(char **) NULL);
+ radius=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
Image
*newImage;
- newImage=CharcoalImage(msl_info->image[n],radius,sigma,bias,
+ newImage=CharcoalImage(msl_info->image[n],radius,sigma,
msl_info->exception);
if (newImage == (Image *) NULL)
break;
}
if (LocaleCompare(keyword,"fuzz") == 0)
{
- msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+ msl_info->image[n]->fuzz=StringToDouble(value,
(char **) NULL);
break;
}
&geometry,&exception);
if ((flags & HeightValue) == 0)
geometry.height=geometry.width;
- (void) GetOneVirtualMagickPixel(msl_info->image[n],
+ (void) GetOneVirtualPixelInfo(msl_info->image[n],
TileVirtualPixelMethod,geometry.x,geometry.y,&target,
&exception);
break;
if (LocaleCompare(keyword,"x") == 0)
{
geometry.x=StringToLong(value);
- (void) GetOneVirtualMagickPixel(msl_info->image[n],
+ (void) GetOneVirtualPixelInfo(msl_info->image[n],
TileVirtualPixelMethod,geometry.x,geometry.y,&target,
&exception);
break;
if (LocaleCompare(keyword,"y") == 0)
{
geometry.y=StringToLong(value);
- (void) GetOneVirtualMagickPixel(msl_info->image[n],
+ (void) GetOneVirtualPixelInfo(msl_info->image[n],
TileVirtualPixelMethod,geometry.x,geometry.y,&target,
&exception);
break;
SetImageType(composite_image,TrueColorMatteType,
&exception);
(void) CompositeImage(composite_image,
- CopyOpacityCompositeOp,msl_info->image[j],0,0,
- &exception);
+ msl_info->image[j],CopyAlphaCompositeOp,MagickTrue,
+ 0,0,&exception);
break;
}
}
if (composite_image->matte != MagickTrue)
(void) SetImageAlpha(composite_image,OpaqueAlpha,
&exception);
- composite_view=AcquireCacheView(composite_image);
+ composite_view=AcquireAuthenticCacheView(composite_image,
+ &exception);
for (y=0; y < (ssize_t) composite_image->rows ; y++)
{
q=GetCacheViewAuthenticPixels(composite_view,0,y,
if (LocaleCompare(keyword,"rotate") == 0)
{
rotate_image=RotateImage(composite_image,
- InterpretLocaleValue(value,(char **) NULL),&exception);
+ StringToDouble(value,(char **) NULL),&exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
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,&exception);
+ (void) CompositeImage(image,rotate_image,compose,
+ MagickTrue,x,y,&exception);
else
- (void) CompositeImage(image,compose,
- composite_image,x,y,&exception);
+ (void) CompositeImage(image,composite_image,
+ compose,MagickTrue,x,y,&exception);
}
if (rotate_image != (Image *) NULL)
rotate_image=DestroyImage(rotate_image);
&exception);
channel_mask=SetPixelChannelMask(image,channel);
if (rotate_image == (Image *) NULL)
- CompositeImage(image,compose,composite_image,geometry.x,geometry.y,
- &exception);
+ CompositeImage(image,composite_image,compose,MagickTrue,geometry.x,
+ geometry.y,&exception);
else
{
/*
composite_image->columns)/2;
geometry.y-=(ssize_t) (rotate_image->rows-
composite_image->rows)/2;
- CompositeImage(image,compose,rotate_image,geometry.x,geometry.y,
- &exception);
+ CompositeImage(image,rotate_image,compose,MagickTrue,geometry.x,
+ geometry.y,&exception);
rotate_image=DestroyImage(rotate_image);
}
(void) SetPixelChannelMask(image,channel_mask);
*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)
}
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=InterpretLocaleValue(value,
+ draw_info->pointsize=StringToDouble(value,
(char **) NULL);
break;
}
{
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))));
}
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,"radius") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
- (char **) NULL);
+ geometry_info.rho=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"blue") == 0)
{
- pixel.blue=InterpretLocaleValue(value,(char **) NULL);
+ pixel.blue=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare(keyword,"green") == 0)
{
- pixel.green=InterpretLocaleValue(value,(char **) NULL);
+ pixel.green=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"red") == 0)
{
- pixel.red=InterpretLocaleValue(value,(char **) NULL);
+ pixel.red=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"amount") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"black") == 0)
{
- levelBlack = InterpretLocaleValue(value,(char **) NULL);
+ levelBlack = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- levelGamma = InterpretLocaleValue(value,(char **) NULL);
+ levelGamma = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"white") == 0)
{
- levelWhite = InterpretLocaleValue(value,(char **) NULL);
+ levelWhite = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"fuzz") == 0)
{
- msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+ msl_info->image[n]->fuzz=StringToDouble(value,
(char **) NULL);
break;
}
&geometry,&exception);
if ((flags & HeightValue) == 0)
geometry.height=geometry.width;
- (void) GetOneVirtualMagickPixel(msl_info->image[n],
+ (void) GetOneVirtualPixelInfo(msl_info->image[n],
TileVirtualPixelMethod,geometry.x,geometry.y,&target,
&exception);
break;
{
if (LocaleCompare(keyword,"opacity") == 0)
{
- opacity=InterpretLocaleValue(value,(char **) NULL);
+ opacity=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
if (LocaleCompare(keyword,"x") == 0)
{
geometry.x=StringToLong(value);
- (void) GetOneVirtualMagickPixel(msl_info->image[n],
+ (void) GetOneVirtualPixelInfo(msl_info->image[n],
TileVirtualPixelMethod,geometry.x,geometry.y,&target,
&exception);
break;
if (LocaleCompare(keyword,"y") == 0)
{
geometry.y=StringToLong(value);
- (void) GetOneVirtualMagickPixel(msl_info->image[n],
+ (void) GetOneVirtualPixelInfo(msl_info->image[n],
TileVirtualPixelMethod,geometry.x,geometry.y,&target,
&exception);
break;
(void) FloodfillPaintImage(msl_info->image[n],draw_info,&target,
geometry.x,geometry.y,paint_method == FloodfillMethod ?
MagickFalse : MagickTrue,msl_info->exception);
- (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+ (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
draw_info=DestroyDrawInfo(draw_info);
break;
}
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
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;
}
{
if (LocaleCompare(keyword,"hue") == 0)
{
- geometry_info.xi=InterpretLocaleValue(value,
+ geometry_info.xi=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"lightness") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"saturation") == 0)
{
- geometry_info.sigma=InterpretLocaleValue(value,
+ geometry_info.sigma=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"whiteness") == 0)
{
- geometry_info.sigma=InterpretLocaleValue(value,
+ geometry_info.sigma=StringToDouble(value,
(char **) NULL);
break;
}
channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
(void) NegateImage(msl_info->image[n],gray,
msl_info->exception);
- (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+ (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
break;
}
if (LocaleCompare((const char *) tag,"normalize") == 0)
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
}
if (LocaleCompare(keyword,"fuzz") == 0)
{
- msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+ msl_info->image[n]->fuzz=StringToDouble(value,
(char **) NULL);
break;
}
channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
(void) OpaquePaintImage(msl_info->image[n],&target,&fill_color,
MagickFalse,msl_info->exception);
- (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+ (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
break;
}
ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
{
(void) ProfileImage(msl_info->image[n],name,
GetStringInfoDatum(profile),(size_t)
- GetStringInfoLength(profile),MagickFalse);
+ GetStringInfoLength(profile),&exception);
profile=DestroyStringInfo(profile);
}
continue;
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);
*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)
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=InterpretLocaleValue(value,
+ draw_info->pointsize=StringToDouble(value,
(char **) NULL);
break;
}
{
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))));
}
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,"radius") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
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':
{
{
if (LocaleCompare(keyword,"x-resolution") == 0)
{
- x_resolution=InterpretLocaleValue(value,(char **) NULL);
+ x_resolution=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"y-resolution") == 0)
{
- y_resolution=InterpretLocaleValue(value,(char **) NULL);
+ y_resolution=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
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->exception);
+ msl_info->image[n]->filter,msl_info->exception);
if (resample_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
}
if (LocaleCompare((const char *) tag,"resize") == 0)
{
- double
- blur;
-
FilterTypes
filter;
break;
}
filter=UndefinedFilter;
- blur=1.0;
if (attributes != (const xmlChar **) NULL)
for (i=0; (attributes[i] != (const xmlChar *) NULL); i++)
{
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':
{
}
}
resize_image=ResizeImage(msl_info->image[n],geometry.width,
- geometry.height,filter,blur,msl_info->exception);
+ geometry.height,filter,msl_info->exception);
if (resize_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- degrees = InterpretLocaleValue(value,(char **) NULL);
+ degrees = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
}
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++)
{
if (LocaleCompare(keyword,"cluster-threshold") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"smoothing-threshold") == 0)
{
- geometry_info.sigma=InterpretLocaleValue(value,
+ geometry_info.sigma=StringToDouble(value,
(char **) NULL);
break;
}
&exception);
if (LocaleCompare(property,value) == 0)
{
- SetImageClipMask(msl_info->image[n],msl_info->image[j],
+ SetImageMask(msl_info->image[n],msl_info->image[j],
&exception);
break;
}
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);
{
if (LocaleCompare(keyword,"azimuth") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"elevation") == 0)
{
- geometry_info.sigma=InterpretLocaleValue(value,
+ geometry_info.sigma=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry_info.xi=InterpretLocaleValue(value,
+ geometry_info.xi=StringToDouble(value,
(char **) NULL);
break;
}
}
}
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->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]);
}
if (LocaleCompare((const char *) tag,"sharpen") == 0)
{
- double bias = 0.0,
+ double
radius = 0.0,
sigma = 1.0;
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 = InterpretLocaleValue(value,(char **) NULL);
+ radius = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
Image
*newImage;
- newImage=SharpenImage(msl_info->image[n],radius,sigma,bias,
+ newImage=SharpenImage(msl_info->image[n],radius,sigma,
msl_info->exception);
if (newImage == (Image *) NULL)
break;
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"threshold") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- geometry_info.rho=InterpretLocaleValue(value,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"threshold") == 0)
{
- threshold = InterpretLocaleValue(value,(char **) NULL);
+ threshold = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",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;
}
&image_info->background_color,exception);
break;
}
- if (LocaleCompare(keyword,"bias") == 0)
- {
- if (image == (Image *) NULL)
- break;
- image->bias=SiPrefixToDouble(value,QuantumRange);
- break;
- }
if (LocaleCompare(keyword,"blue-primary") == 0)
{
if (image == (Image *) NULL)
{
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);