gamma=DisplayGamma;
value=GetImageProperty(image,"gamma",exception);
if (value != (const char *) NULL)
- gamma=1.0/fabs(StringToDouble(value,(char **) NULL)) >=
- MagickEpsilon ? StringToDouble(value,(char **) NULL) : 1.0;
+ gamma=1.0/fabs(StringToDouble(value,(char **) NULL)) >= MagickEpsilon ?
+ StringToDouble(value,(char **) NULL) : 1.0;
film_gamma=FilmGamma;
value=GetImageProperty(image,"film-gamma",exception);
if (value != (const char *) NULL)
if (*fuzz == '\0')
break;
(void) ConcatenateMagickString(fuzz,"%",MaxTextExtent);
- (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+1.0);
+ (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+
+ 1.0);
break;
}
case ColorEditUndoCommand:
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- threshold=StringToDoubleInterval(factor,QuantumRange);
+ threshold=StringToDoubleInterval(factor,(double) QuantumRange+1.0);
(void) BilevelImage(*image,threshold,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- threshold=StringToDoubleInterval(factor,QuantumRange);
+ threshold=StringToDoubleInterval(factor,(double) QuantumRange+1.0);
sepia_image=SepiaToneImage(*image,threshold,exception);
if (sepia_image != (Image *) NULL)
{
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- threshold=StringToDoubleInterval(factor,QuantumRange);
+ threshold=StringToDoubleInterval(factor,(double) QuantumRange+1.0);
(void) SolarizeImage(*image,threshold,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
if (*fuzz == '\0')
break;
(void) ConcatenateMagickString(fuzz,"%",MaxTextExtent);
- (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+1.0);
+ (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+
+ 1.0);
break;
}
case MatteEditValueCommand:
if (LocaleCompare("font-size",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->pointsize=StringToDouble(token,
- (char **) NULL);
+ graphic_context[n]->pointsize=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("font-stretch",keyword) == 0)
if (LocaleCompare("kerning",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->kerning=StringToDouble(token,
- (char **) NULL);
+ graphic_context[n]->kerning=StringToDouble(token,(char **) NULL);
break;
}
status=MagickFalse;
GetMagickToken(q,&q,token);
(void) CopyMagickString(name,token,MaxTextExtent);
GetMagickToken(q,&q,token);
- bounds.x=(ssize_t) ceil(StringToDouble(token,
- (char **) NULL)-0.5);
+ bounds.x=(ssize_t) ceil(StringToDouble(token,(char **) NULL)-
+ 0.5);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- bounds.y=(ssize_t) ceil(StringToDouble(token,
- (char **) NULL)-0.5);
+ bounds.y=(ssize_t) ceil(StringToDouble(token,(char **) NULL)-
+ 0.5);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- graphic_context[n]->dash_pattern[j]=StringToDouble(
- token,(char **) NULL);
+ graphic_context[n]->dash_pattern[j]=StringToDouble(token,
+ (char **) NULL);
}
if ((x & 0x01) != 0)
for ( ; j < (2*x); j++)
if (LocaleCompare("viewbox",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->viewbox.x=(ssize_t) ceil(StringToDouble(
- token,(char **) NULL)-0.5);
+ graphic_context[n]->viewbox.x=(ssize_t) ceil(StringToDouble(token,
+ (char **) NULL)-0.5);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- graphic_context[n]->viewbox.y=(ssize_t) ceil(StringToDouble(
- token,(char **) NULL)-0.5);
+ graphic_context[n]->viewbox.y=(ssize_t) ceil(StringToDouble(token,
+ (char **) NULL)-0.5);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- graphic_context[n]->viewbox.width=(size_t) floor(
- StringToDouble(token,(char **) NULL)+0.5);
+ graphic_context[n]->viewbox.width=(size_t) floor(StringToDouble(
+ token,(char **) NULL)+0.5);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- graphic_context[n]->viewbox.height=(size_t) floor(
- StringToDouble(token,(char **) NULL)+0.5);
+ graphic_context[n]->viewbox.height=(size_t) floor(StringToDouble(
+ token,(char **) NULL)+0.5);
break;
}
status=MagickFalse;
draw_info->kerning=StringToDouble(option,(char **) NULL);
option=GetImageOption(image_info,"interline-spacing");
if (option != (const char *) NULL)
- draw_info->interline_spacing=StringToDouble(option,
- (char **) NULL);
+ draw_info->interline_spacing=StringToDouble(option,(char **) NULL);
option=GetImageOption(image_info,"interword-spacing");
if (option != (const char *) NULL)
- draw_info->interword_spacing=StringToDouble(option,
- (char **) NULL);
+ draw_info->interword_spacing=StringToDouble(option,(char **) NULL);
option=GetImageOption(image_info,"direction");
if (option != (const char *) NULL)
draw_info->direction=(DirectionType) ParseCommandOption(
{
case 0:
{
- color_correction.red.slope=StringToDouble(token,
- (char **) NULL);
+ color_correction.red.slope=StringToDouble(token,(char **) NULL);
break;
}
case 1:
{
case 0:
{
- color_correction.red.power=StringToDouble(token,
- (char **) NULL);
+ color_correction.red.power=StringToDouble(token,(char **) NULL);
break;
}
case 1:
exception);
option=GetImageOption(image_info,"bias");
if (option != (const char *) NULL)
- image->bias=StringToDoubleInterval(option,QuantumRange);
+ image->bias=StringToDoubleInterval(option,(double) QuantumRange+1.0);
option=GetImageOption(image_info,"black-point-compensation");
if (option != (const char *) NULL)
image->black_point_compensation=(MagickBooleanType) ParseCommandOption(
kernel->values[i] = nan; /* do not include this value in kernel */
}
else {
- kernel->values[i] = StringToDouble(token,(char **) NULL);
+ kernel->values[i]=StringToDouble(token,(char **) NULL);
( kernel->values[i] < 0)
? ( kernel->negative_range += kernel->values[i] )
: ( kernel->positive_range += kernel->values[i] );
}
if (LocaleCompare(property,"bias") == 0)
{
- image->bias=StringToDoubleInterval(value,QuantumRange);
+ image->bias=StringToDoubleInterval(value,(double) QuantumRange+1.0);
break;
}
status=AddValueToSplayTree((SplayTreeInfo *) image->properties,
}
artifact=GetImageArtifact(image,"filter:support");
if (artifact != (const char *) NULL)
- resize_filter->support=fabs(StringToDouble(artifact,
- (char **) NULL)); /* override support */
+ resize_filter->support=fabs(StringToDouble(artifact,(char **) NULL)); /* override support */
/*
Scale windowing function separately to the support 'clipping' window that
calling operator is planning to actually use (expert override).
resize_filter->window_support=resize_filter->support; /* default */
artifact=GetImageArtifact(image,"filter:win-support");
if (artifact != (const char *) NULL)
- resize_filter->window_support=fabs(StringToDouble(artifact,
- (char **) NULL));
+ resize_filter->window_support=fabs(StringToDouble(artifact,(char **) NULL));
/*
Adjust window function scaling to match windowing support for weighting
function. This avoids a division on every filter call.
double
value;
- value=StringToDoubleInterval(string,interval);
+ value=SiPrefixToDoubleInterval(string,interval);
if (value >= (double) MagickULLConstant(~0))
return(MagickULLConstant(~0));
return((MagickSizeType) value);
(void) RegisterNULLImage();
(void) RegisterOTBImage();
(void) RegisterPALMImage();
-#if defined(MAGICKCORE_PANGO_DELEGATE)
- (void) RegisterPANGOImage();
-#endif
(void) RegisterPATTERNImage();
(void) RegisterPCDImage();
(void) RegisterPCLImage();
UnregisterNULLImage();
UnregisterOTBImage();
UnregisterPALMImage();
-#if defined(MAGICKCORE_PANGO_DELEGATE)
- UnregisterPANGOImage();
-#endif
UnregisterPATTERNImage();
UnregisterPCDImage();
UnregisterPCLImage();
RegisterPBMImage(void),
RegisterOTBImage(void),
RegisterPALMImage(void),
- RegisterPANGOImage(void),
RegisterPATTERNImage(void),
RegisterPCDImage(void),
RegisterPCDSImage(void),
UnregisterPBMImage(void),
UnregisterOTBImage(void),
UnregisterPALMImage(void),
- UnregisterPANGOImage(void),
UnregisterPATTERNImage(void),
UnregisterPCDImage(void),
UnregisterPCDSImage(void),
#include <MagickCore/locale_.h>
+static inline double SiPrefixToDoubleInterval(const char *string,
+ const double interval)
+{
+ char
+ *q;
+
+ double
+ value;
+
+ value=InterpretSiPrefixValue(string,&q);
+ if (*q == '%')
+ value*=interval/100.0;
+ return(value);
+}
+
static inline double StringToDouble(const char *restrict string,
char **restrict sentinal)
{
double
value;
- value=InterpretSiPrefixValue(string,&q);
+ value=InterpretLocaleValue(string,&q);
if (*q == '%')
value*=interval/100.0;
return(value);
if (*option == '+')
dissimilarity_threshold=DefaultDissimilarityThreshold;
else
- dissimilarity_threshold=StringToDouble(argv[i],
- (char **) NULL);
+ dissimilarity_threshold=StringToDouble(argv[i],(char **) NULL);
break;
}
if (LocaleCompare("duration",option+1) == 0)
if (*option == '+')
threshold=40.0*QuantumRange/100.0;
else
- threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
+ threshold=StringToDoubleInterval(argv[i+1],(double) QuantumRange+
+ 1.0);
mogrify_image=DeskewImage(*image,threshold,exception);
break;
}
(void) SyncImageSettings(mogrify_info,*image,exception);
op=(MagickEvaluateOperator) ParseCommandOption(
MagickEvaluateOptions,MagickFalse,argv[i+1]);
- constant=StringToDoubleInterval(argv[i+2],QuantumRange);
+ constant=StringToDoubleInterval(argv[i+2],(double) QuantumRange+
+ 1.0);
(void) EvaluateImage(*image,op,constant,exception);
break;
}
}
if (LocaleCompare("linewidth",option+1) == 0)
{
- draw_info->stroke_width=StringToDouble(argv[i+1],
- (char **) NULL);
+ draw_info->stroke_width=StringToDouble(argv[i+1],(char **) NULL);
break;
}
if (LocaleCompare("liquid-rescale",option+1) == 0)
Sepia-tone image.
*/
(void) SyncImageSettings(mogrify_info,*image,exception);
- threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
+ threshold=StringToDoubleInterval(argv[i+1],(double) QuantumRange+
+ 1.0);
mogrify_image=SepiaToneImage(*image,threshold,exception);
break;
}
threshold;
(void) SyncImageSettings(mogrify_info,*image,exception);
- threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
+ threshold=StringToDoubleInterval(argv[i+1],(double) QuantumRange+
+ 1.0);
(void) SolarizeImage(*image,threshold,exception);
break;
}
}
if (LocaleCompare("strokewidth",option+1) == 0)
{
- draw_info->stroke_width=StringToDouble(argv[i+1],
- (char **) NULL);
+ draw_info->stroke_width=StringToDouble(argv[i+1],(char **) NULL);
break;
}
if (LocaleCompare("style",option+1) == 0)
if (*option == '+')
threshold=(double) QuantumRange/2;
else
- threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
+ threshold=StringToDoubleInterval(argv[i+1],(double) QuantumRange+
+ 1.0);
(void) BilevelImage(*image,threshold,exception);
break;
}
limit=MagickResourceInfinity;
if (LocaleCompare("unlimited",argv[i+1]) != 0)
- limit=(MagickSizeType) StringToDoubleInterval(argv[i+1],100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(argv[i+1],
+ 100.0);
(void) SetMagickResourceLimit(MemoryResource,limit);
(void) SetMagickResourceLimit(MapResource,2*limit);
break;
MagickFalse,argv[i+1]);
limit=MagickResourceInfinity;
if (LocaleCompare("unlimited",argv[i+2]) != 0)
- limit=(MagickSizeType) StringToDoubleInterval(argv[i+2],100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(argv[i+2],
+ 100.0);
(void) SetMagickResourceLimit(type,limit);
break;
}
ThrowMontageException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowMontageInvalidArgumentException(option,argv[i]);
- montage_info->pointsize=StringToDouble(argv[i],
- (char **) NULL);
+ montage_info->pointsize=StringToDouble(argv[i],(char **) NULL);
break;
}
if (LocaleCompare("polaroid",option+1) == 0)
limit=MagickResourceInfinity;
if (LocaleCompare("unlimited",arg) != 0)
- limit=(MagickSizeType) StringToDoubleInterval(arg,100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(arg,100.0);
(void) SetMagickResourceLimit(MemoryResource,limit);
(void) SetMagickResourceLimit(MapResource,2*limit);
break;
}
if (LocaleCompare("caption",option) == 0)
{
- (void) SetImageOption(image_info,option,
- IfSetOption ? arg : (const char*)NULL);
+ (void) SetImageOption(image_info,option,IfSetOption ? arg :
+ (const char*)NULL);
break;
}
if (LocaleCompare("channel",option) == 0)
*/
if (IfSetOption)
{
- image_info->fuzz=StringToDoubleInterval(arg,(double) QuantumRange+1.0);
+ image_info->fuzz=StringToDoubleInterval(arg,(double) QuantumRange+
+ 1.0);
(void) SetImageOption(image_info,option,arg);
break;
}
value = IfSetOption ? arg : "0"; /* undefined? */
(void) SetImageOption(image_info,option, value);
- draw_info->interline_spacing=StringToDouble(value,
- (char **) NULL);
+ draw_info->interline_spacing=StringToDouble(value,(char **) NULL);
break;
}
if (LocaleCompare("interpolate",option) == 0)
value = IfSetOption ? arg : "0"; /* undefined? */
(void) SetImageOption(image_info,option, value);
- draw_info->interword_spacing=StringToDouble(value,
- (char **) NULL);
+ draw_info->interword_spacing=StringToDouble(value,(char **) NULL);
break;
}
break;
MagickFalse,arg);
limit=MagickResourceInfinity;
if (LocaleCompare("unlimited",argv[2]) != 0)
- limit=(MagickSizeType) StringToDoubleInterval(argv[2],100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(argv[2],
+ 100.0);
(void) SetMagickResourceLimit(type,limit);
break;
}
if (*argv[0] == '+')
threshold=40.0*QuantumRange/100.0;
else
- threshold=StringToDoubleInterval(args[0],QuantumRange);
+ threshold=StringToDoubleInterval(args[0],(double) QuantumRange+1.0);
new_image=DeskewImage(*image,threshold,exception);
break;
}
(void) SyncImageSettings(image_info,*image,exception);
op=(MagickEvaluateOperator) ParseCommandOption(
MagickEvaluateOptions,MagickFalse,args[0]);
- constant=StringToDoubleInterval(argv[2],QuantumRange);
+ constant=StringToDoubleInterval(argv[2],(double) QuantumRange+1.0);
(void) EvaluateImage(*image,op,constant,exception);
break;
}
threshold;
(void) SyncImageSettings(image_info,*image,exception);
- threshold=StringToDoubleInterval(args[0],QuantumRange);
+ threshold=StringToDoubleInterval(args[0],(double) QuantumRange+1.0);
new_image=SepiaToneImage(*image,threshold,exception);
break;
}
threshold;
(void) SyncImageSettings(image_info,*image,exception);
- threshold=StringToDoubleInterval(args[0],QuantumRange);
+ threshold=StringToDoubleInterval(args[0],(double) QuantumRange+1.0);
(void) SolarizeImage(*image,threshold,exception);
break;
}
if (*argv[0] == '+')
threshold=(double) QuantumRange/2;
else
- threshold=StringToDoubleInterval(args[0],QuantumRange);
+ threshold=StringToDoubleInterval(args[0],(double) QuantumRange+1.0);
(void) BilevelImage(*image,threshold,exception);
break;
}
%
*/
+static double SiPrefixToDoubleInterval(const char *string,const double interval)
+{
+ char
+ *q;
+
+ double
+ value;
+
+ value=InterpretSiPrefixValue(string,&q);
+ if (*q == '%')
+ value*=interval/100.0;
+ return(value);
+}
+
+static inline double StringToDouble(const char *restrict string,
+ char **restrict sentinal)
+{
+ return(InterpretLocaleValue(string,sentinal));
+}
+
static double StringToDoubleInterval(const char *string,const double interval)
{
char
*q;
double
- scale,
value;
- value=StringToDouble(string,&q);
- scale=1000.0;
- if ((*q != '\0') && (tolower((int) ((unsigned char) *(q+1))) == 'i'))
- scale=1024.0;
- switch (tolower((int) ((unsigned char) *q)))
- {
- case '%': value*=pow(scale,0)*interval/100.0; break;
- case 'k': value*=pow(scale,1); break;
- case 'm': value*=pow(scale,2); break;
- case 'g': value*=pow(scale,3); break;
- case 't': value*=pow(scale,4); break;
- case 'p': value*=pow(scale,5); break;
- case 'e': value*=pow(scale,6); break;
- case 'z': value*=pow(scale,7); break;
- case 'y': value*=pow(scale,8); break;
- default: break;
- }
+ value=InterpretLocaleValue(string,&q);
+ if (*q == '%')
+ value*=interval/100.0;
return(value);
}
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(SvPV(sval,na),
+ 100.0);
(void) SetMagickResourceLimit(AreaResource,limit);
break;
}
if (LocaleCompare(attribute,"bias") == 0)
{
for ( ; image; image=image->next)
- image->bias=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
+ image->bias=StringToDoubleInterval(SvPV(sval,na),(double)
+ QuantumRange+1.0);
break;
}
if (LocaleCompare(attribute,"blue-primary") == 0)
if (LocaleCompare(attribute,"cache-threshold") == 0)
{
(void) SetMagickResourceLimit(MemoryResource,(MagickSizeType)
- StringToDoubleInterval(SvPV(sval,na),100.0));
+ SiPrefixToDoubleInterval(SvPV(sval,na),100.0));
(void) SetMagickResourceLimit(MapResource,(MagickSizeType)
- (2*StringToDoubleInterval(SvPV(sval,na),100.0)));
+ (2.0*SiPrefixToDoubleInterval(SvPV(sval,na),100.0)));
break;
}
if (LocaleCompare(attribute,"clip-mask") == 0)
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(SvPV(sval,na),
+ 100.0);
(void) SetMagickResourceLimit(DiskResource,limit);
break;
}
if (LocaleCompare(attribute,"fuzz") == 0)
{
if (info)
- info->image_info->fuzz=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
+ info->image_info->fuzz=StringToDoubleInterval(SvPV(sval,na),(double)
+ QuantumRange+1.0);
for ( ; image; image=image->next)
- image->fuzz=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
+ image->fuzz=StringToDoubleInterval(SvPV(sval,na),(double)
+ QuantumRange+1.0);
break;
}
if (info)
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(SvPV(sval,na),
+ 100.0);
(void) SetMagickResourceLimit(MapResource,limit);
break;
}
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(SvPV(sval,na),
+ 100.0);
(void) SetMagickResourceLimit(MemoryResource,limit);
break;
}
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(SvPV(sval,na),
+ 100.0);
(void) SetMagickResourceLimit(ThreadResource,limit);
break;
}
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) SiPrefixToDoubleInterval(SvPV(sval,na),
+ 100.0);
(void) SetMagickResourceLimit(TimeResource,limit);
break;
}
if (attribute_flag[4] != 0)
geometry.y=argument_list[4].integer_reference;
if (attribute_flag[5] != 0)
- image->fuzz=
- StringToDoubleInterval(argument_list[5].string_reference,QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[5].string_reference,(double) QuantumRange+1.0);
image=CropImage(image,&geometry,exception);
break;
}
invert=MagickTrue;
}
if (attribute_flag[5] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[5].string_reference,(double) QuantumRange+1.0);
if (attribute_flag[6] != 0)
invert=(MagickBooleanType) argument_list[6].integer_reference;
(void) FloodfillPaintImage(image,draw_info,&target,geometry.x,
if (compose != DissolveCompositeOp)
(void) SetImageAlpha(composite_image,(Quantum)
StringToDoubleInterval(argument_list[6].string_reference,
- QuantumRange),exception);
+ (double) QuantumRange+1.0),exception);
else
{
CacheView
(void) CloneString(&image->geometry,
argument_list[6].string_reference);
opacity=(Quantum) StringToDoubleInterval(
- argument_list[6].string_reference,QuantumRange);
+ argument_list[6].string_reference,(double) QuantumRange+
+ 1.0);
if (composite_image->matte != MagickTrue)
(void) SetImageAlpha(composite_image,OpaqueAlpha,exception);
composite_view=AcquireCacheView(composite_image);
QueryColorCompliance(argument_list[4].string_reference,
AllCompliance,&target,exception);
if (attribute_flag[3] != 0)
- target.alpha=StringToDoubleInterval(argument_list[3].string_reference,
- QuantumRange);
+ target.alpha=StringToDoubleInterval(
+ argument_list[3].string_reference,(double) (double) QuantumRange+
+ 1.0);
if (attribute_flag[5] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[5].string_reference,(double) QuantumRange+1.0);
invert=MagickFalse;
if (attribute_flag[6] != 0)
invert=(MagickBooleanType) argument_list[6].integer_reference;
(void) QueryColorCompliance(argument_list[1].string_reference,
AllCompliance,&fill_color,exception);
if (attribute_flag[2] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[2].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[2].string_reference,(double) QuantumRange+1.0);
if (attribute_flag[3] != 0)
channel=(ChannelType) argument_list[3].integer_reference;
invert=MagickFalse;
&geometry_info);
if (attribute_flag[1] != 0)
geometry_info.rho=StringToDoubleInterval(
- argument_list[1].string_reference,QuantumRange);
+ argument_list[1].string_reference,(double) QuantumRange+1.0);
(void) SolarizeImage(image,geometry_info.rho,exception);
break;
}
opacity=TransparentAlpha;
if (attribute_flag[1] != 0)
opacity=StringToDoubleInterval(argument_list[1].string_reference,
- QuantumRange);
+ (double) QuantumRange+1.0);
if (attribute_flag[2] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[2].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[2].string_reference,(double) QuantumRange+1.0);
if (attribute_flag[3] == 0)
argument_list[3].integer_reference=0;
invert=MagickFalse;
if (attribute_flag[1] != 0)
channel=(ChannelType) argument_list[1].integer_reference;
threshold=StringToDoubleInterval(argument_list[0].string_reference,
- QuantumRange);
+ (double) QuantumRange+1.0);
channel_mask=SetPixelChannelMask(image,channel);
(void) BilevelImage(image,threshold,exception);
(void) SetPixelChannelMask(image,channel_mask);
case 59: /* Trim */
{
if (attribute_flag[0] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[0].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[0].string_reference,(double) QuantumRange+1.0);
image=TrimImage(image,exception);
break;
}
if (attribute_flag[1] != 0)
channel=(ChannelType) argument_list[1].integer_reference;
if (attribute_flag[2] != 0)
- image->bias=StringToDoubleInterval(argument_list[2].string_reference,
- QuantumRange);
+ image->bias=StringToDoubleInterval(
+ argument_list[2].string_reference,(double) QuantumRange+1.0);
if (attribute_flag[3] != 0)
{
kernel=AcquireKernelInfo(argument_list[3].string_reference);
goto PerlException;
}
if (attribute_flag[1] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[1].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[1].string_reference,(double) QuantumRange+1.0);
(void) IsImagesEqual(image,argument_list[0].image_reference,
exception);
break;
if (attribute_flag[4] != 0)
geometry.y=argument_list[4].integer_reference;
if (attribute_flag[5] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[5].string_reference,(double) QuantumRange+1.0);
if (attribute_flag[6] != 0)
(void) QueryColorCompliance(argument_list[6].string_reference,
AllCompliance,&image->background_color,exception);
if (attribute_flag[4] != 0)
geometry.y=argument_list[4].integer_reference;
if (attribute_flag[5] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[5].string_reference,(double) QuantumRange+1.0);
if (attribute_flag[6] != 0)
(void) QueryColorCompliance(argument_list[6].string_reference,
AllCompliance,&image->background_color,exception);
QueryColorCompliance(argument_list[4].string_reference,
AllCompliance,&target,exception);
if (attribute_flag[5] != 0)
- image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
- QuantumRange);
+ image->fuzz=StringToDoubleInterval(
+ argument_list[5].string_reference,(double) QuantumRange+1.0);
if (attribute_flag[6] != 0)
channel=(ChannelType) argument_list[6].integer_reference;
invert=MagickFalse;
&geometry_info);
if (attribute_flag[1] != 0)
geometry_info.rho=StringToDoubleInterval(
- argument_list[1].string_reference,QuantumRange);
+ argument_list[1].string_reference,(double) QuantumRange+1.0);
image=DeskewImage(image,geometry_info.rho,exception);
break;
}
}
if (LocaleCompare(keyword,"error") == 0)
{
- image->error.mean_error_per_pixel=StringToDouble(
- options,(char **) NULL);
+ image->error.mean_error_per_pixel=StringToDouble(options,
+ (char **) NULL);
break;
}
(void) SetImageProperty(image,keyword,options,exception);
}
if (LocaleCompare(keyword,"maximum-error") == 0)
{
- image->error.normalized_maximum_error=
- StringToDouble(options,(char **) NULL);
+ image->error.normalized_maximum_error=StringToDouble(
+ options,(char **) NULL);
break;
}
if (LocaleCompare(keyword,"mean-error") == 0)
{
- image->error.normalized_mean_error=StringToDouble(
- options,(char **) NULL);
+ image->error.normalized_mean_error=StringToDouble(options,
+ (char **) NULL);
break;
}
if (LocaleCompare(keyword,"montage") == 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=StringToDouble(value,
- (char **) NULL);
+ draw_info->pointsize=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,
- (char **) NULL);
+ geometry_info.rho=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
case 'b':
{
if (LocaleCompare(keyword, "bias") == 0)
- {
- bias = StringToDouble(value,(char **) NULL);
- break;
- }
+ {
+ bias=StringToDouble(value,(char **) NULL);
+ break;
+ }
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
break;
}
case 'R':
case 'r':
{
- if (LocaleCompare(keyword, "radius") == 0)
+ if (LocaleCompare(keyword,"radius") == 0)
{
- radius = StringToDouble(value,(char **) NULL);
+ radius=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,
- (char **) NULL);
+ geometry_info.rho=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",