gamma=DisplayGamma;
value=GetImageProperty(image,"gamma",exception);
if (value != (const char *) NULL)
- gamma=1.0/fabs(InterpretLocaleValue(value,(char **) NULL)) >=
- MagickEpsilon ? InterpretLocaleValue(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)
- film_gamma=InterpretLocaleValue(value,(char **) NULL);
+ film_gamma=StringToDouble(value,(char **) NULL);
reference_black=ReferenceBlack;
value=GetImageProperty(image,"reference-black",exception);
if (value != (const char *) NULL)
- reference_black=InterpretLocaleValue(value,(char **) NULL);
+ reference_black=StringToDouble(value,(char **) NULL);
reference_white=ReferenceWhite;
value=GetImageProperty(image,"reference-white",exception);
if (value != (const char *) NULL)
- reference_white=InterpretLocaleValue(value,(char **) NULL);
+ reference_white=StringToDouble(value,(char **) NULL);
logmap=(Quantum *) AcquireQuantumMemory((size_t) MaxMap+1UL,
sizeof(*logmap));
if (logmap == (Quantum *) NULL)
gamma=DisplayGamma;
value=GetImageProperty(image,"gamma",exception);
if (value != (const char *) NULL)
- gamma=1.0/fabs(InterpretLocaleValue(value,(char **) NULL)) >=
- MagickEpsilon ? InterpretLocaleValue(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)
- film_gamma=InterpretLocaleValue(value,(char **) NULL);
+ film_gamma=StringToDouble(value,(char **) NULL);
reference_black=ReferenceBlack;
value=GetImageProperty(image,"reference-black",exception);
if (value != (const char *) NULL)
- reference_black=InterpretLocaleValue(value,(char **) NULL);
+ reference_black=StringToDouble(value,(char **) NULL);
reference_white=ReferenceWhite;
value=GetImageProperty(image,"reference-white",exception);
if (value != (const char *) NULL)
- reference_white=InterpretLocaleValue(value,(char **) NULL);
+ reference_white=StringToDouble(value,(char **) NULL);
logmap=(Quantum *) AcquireQuantumMemory((size_t) MaxMap+1UL,
sizeof(*logmap));
if (logmap == (Quantum *) NULL)
break;
if (entry != 8)
{
- degrees=InterpretLocaleValue(RotateMenu[entry],(char **) NULL);
+ degrees=StringToDouble(RotateMenu[entry],(char **) NULL);
break;
}
(void) XDialogWidget(display,windows,"OK","Enter rotation angle:",
angle);
if (*angle == '\0')
break;
- degrees=InterpretLocaleValue(angle,(char **) NULL);
+ degrees=StringToDouble(angle,(char **) NULL);
break;
}
case AnnotateHelpCommand:
break;
if (entry != 5)
{
- (*image)->fuzz=InterpretLocaleInterval(FuzzMenu[entry],(double)
+ (*image)->fuzz=StringToDoubleInterval(FuzzMenu[entry],(double)
QuantumRange+1.0);
break;
}
if (*fuzz == '\0')
break;
(void) ConcatenateMagickString(fuzz,"%",MaxTextExtent);
- (*image)->fuzz=InterpretLocaleInterval(fuzz,(double) QuantumRange+1.0);
+ (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+1.0);
break;
}
case ColorEditUndoCommand:
GXinvert);
if (*factor == '\0')
break;
- blend=InterpretLocaleValue(factor,(char **) NULL);
+ blend=StringToDouble(factor,(char **) NULL);
compose=DissolveCompositeOp;
break;
}
(void) XDialogWidget(display,windows,"Trim","Enter fuzz factor:",fuzz);
if (*fuzz == '\0')
break;
- (*image)->fuzz=InterpretLocaleInterval(fuzz,(double) QuantumRange+1.0);
+ (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+1.0);
/*
Trim image.
*/
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- threshold=InterpretLocaleInterval(factor,QuantumRange);
+ threshold=StringToDoubleInterval(factor,QuantumRange);
(void) BilevelImage(*image,threshold,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- threshold=InterpretLocaleInterval(factor,QuantumRange);
+ threshold=StringToDoubleInterval(factor,QuantumRange);
sepia_image=SepiaToneImage(*image,threshold,exception);
if (sepia_image != (Image *) NULL)
{
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- threshold=InterpretLocaleInterval(factor,QuantumRange);
+ threshold=StringToDoubleInterval(factor,QuantumRange);
(void) SolarizeImage(*image,threshold,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
if (entry != 5)
{
- (*image)->fuzz=InterpretLocaleInterval(FuzzMenu[entry],(double)
+ (*image)->fuzz=StringToDoubleInterval(FuzzMenu[entry],(double)
QuantumRange+1.0);
break;
}
if (*fuzz == '\0')
break;
(void) ConcatenateMagickString(fuzz,"%",MaxTextExtent);
- (*image)->fuzz=InterpretLocaleInterval(fuzz,(double) QuantumRange+1.0);
+ (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+1.0);
break;
}
case MatteEditValueCommand:
}
draw_info=CloneDrawInfo(resource_info->image_info,
(DrawInfo *) NULL);
- draw_info->fill.alpha=ClampToQuantum(InterpretLocaleValue(matte,
+ draw_info->fill.alpha=ClampToQuantum(StringToDouble(matte,
(char **) NULL));
channel_mask=SetPixelChannelMask(*image,AlphaChannel);
(void) FloodfillPaintImage(*image,draw_info,&target,(ssize_t)
artifact=GetImageArtifact(image,"distort:scale");
output_scaling = 1.0;
if (artifact != (const char *) NULL) {
- output_scaling = fabs(InterpretLocaleValue(artifact,(char **) NULL));
+ output_scaling = fabs(StringToDouble(artifact,(char **) NULL));
geometry.width *= (size_t) output_scaling;
geometry.height *= (size_t) output_scaling;
geometry.x *= (ssize_t) output_scaling;
double
value;
- value=InterpretLocaleValue(point,&p);
+ value=StringToDouble(point,&p);
return((value == 0.0) && (p == point) ? MagickFalse : MagickTrue);
}
if (LocaleCompare("affine",keyword) == 0)
{
GetMagickToken(q,&q,token);
- affine.sx=InterpretLocaleValue(token,(char **) NULL);
+ affine.sx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.rx=InterpretLocaleValue(token,(char **) NULL);
+ affine.rx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.ry=InterpretLocaleValue(token,(char **) NULL);
+ affine.ry=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.sy=InterpretLocaleValue(token,(char **) NULL);
+ affine.sy=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.tx=InterpretLocaleValue(token,(char **) NULL);
+ affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.ty=InterpretLocaleValue(token,(char **) NULL);
+ affine.ty=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("arc",keyword) == 0)
GetMagickToken(q,&q,token);
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
graphic_context[n]->fill.alpha=(MagickRealType) QuantumRange*
- factor*InterpretLocaleValue(token,(char **) NULL);
+ factor*StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("fill-rule",keyword) == 0)
if (LocaleCompare("font-size",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->pointsize=InterpretLocaleValue(token,
+ graphic_context[n]->pointsize=StringToDouble(token,
(char **) NULL);
break;
}
if (LocaleCompare("interline-spacing",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->interline_spacing=InterpretLocaleValue(token,
+ graphic_context[n]->interline_spacing=StringToDouble(token,
(char **) NULL);
break;
}
if (LocaleCompare("interword-spacing",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->interword_spacing=InterpretLocaleValue(token,
+ graphic_context[n]->interword_spacing=StringToDouble(token,
(char **) NULL);
break;
}
if (LocaleCompare("kerning",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->kerning=InterpretLocaleValue(token,
+ graphic_context[n]->kerning=StringToDouble(token,
(char **) NULL);
break;
}
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
graphic_context[n]->alpha=ClampToQuantum((MagickRealType)
QuantumRange*(1.0-((1.0-QuantumScale*graphic_context[n]->alpha)*
- factor*InterpretLocaleValue(token,(char **) NULL))));
+ factor*StringToDouble(token,(char **) NULL))));
graphic_context[n]->fill.alpha=(double) graphic_context[n]->alpha;
graphic_context[n]->stroke.alpha=(double) graphic_context[n]->alpha;
break;
GetMagickToken(q,&q,token);
(void) CopyMagickString(type,token,MaxTextExtent);
GetMagickToken(q,&q,token);
- segment.x1=InterpretLocaleValue(token,(char **) NULL);
+ segment.x1=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- segment.y1=InterpretLocaleValue(token,(char **) NULL);
+ segment.y1=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- segment.x2=InterpretLocaleValue(token,(char **) NULL);
+ segment.x2=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- segment.y2=InterpretLocaleValue(token,(char **) NULL);
+ segment.y2=StringToDouble(token,(char **) NULL);
if (LocaleCompare(type,"radial") == 0)
{
GetMagickToken(q,&q,token);
GetMagickToken(q,&q,token);
(void) CopyMagickString(name,token,MaxTextExtent);
GetMagickToken(q,&q,token);
- bounds.x=(ssize_t) ceil(InterpretLocaleValue(token,
+ 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(InterpretLocaleValue(token,
+ bounds.y=(ssize_t) ceil(StringToDouble(token,
(char **) NULL)-0.5);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- bounds.width=(size_t) floor(InterpretLocaleValue(token,
+ bounds.width=(size_t) floor(StringToDouble(token,
(char **) NULL)+0.5);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- bounds.height=(size_t) floor(InterpretLocaleValue(token,
+ bounds.height=(size_t) floor(StringToDouble(token,
(char **) NULL)+0.5);
for (p=q; *q != '\0'; )
{
if (LocaleCompare("rotate",keyword) == 0)
{
GetMagickToken(q,&q,token);
- angle=InterpretLocaleValue(token,(char **) NULL);
+ angle=StringToDouble(token,(char **) NULL);
affine.sx=cos(DegreesToRadians(fmod((double) angle,360.0)));
affine.rx=sin(DegreesToRadians(fmod((double) angle,360.0)));
affine.ry=(-sin(DegreesToRadians(fmod((double) angle,360.0))));
if (LocaleCompare("scale",keyword) == 0)
{
GetMagickToken(q,&q,token);
- affine.sx=InterpretLocaleValue(token,(char **) NULL);
+ affine.sx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.sy=InterpretLocaleValue(token,(char **) NULL);
+ affine.sy=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("skewX",keyword) == 0)
{
GetMagickToken(q,&q,token);
- angle=InterpretLocaleValue(token,(char **) NULL);
+ angle=StringToDouble(token,(char **) NULL);
affine.ry=sin(DegreesToRadians(angle));
break;
}
if (LocaleCompare("skewY",keyword) == 0)
{
GetMagickToken(q,&q,token);
- angle=InterpretLocaleValue(token,(char **) NULL);
+ angle=StringToDouble(token,(char **) NULL);
affine.rx=(-tan(DegreesToRadians(angle)/2.0));
break;
}
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- graphic_context[n]->dash_pattern[j]=InterpretLocaleValue(
+ graphic_context[n]->dash_pattern[j]=StringToDouble(
token,(char **) NULL);
}
if ((x & 0x01) != 0)
if (LocaleCompare("stroke-dashoffset",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->dash_offset=InterpretLocaleValue(token,
+ graphic_context[n]->dash_offset=StringToDouble(token,
(char **) NULL);
break;
}
GetMagickToken(q,&q,token);
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
graphic_context[n]->stroke.alpha=(MagickRealType) QuantumRange*
- factor*InterpretLocaleValue(token,(char **) NULL);
+ factor*StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("stroke-width",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->stroke_width=InterpretLocaleValue(token,
+ graphic_context[n]->stroke_width=StringToDouble(token,
(char **) NULL);
break;
}
if (LocaleCompare("translate",keyword) == 0)
{
GetMagickToken(q,&q,token);
- affine.tx=InterpretLocaleValue(token,(char **) NULL);
+ affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.ty=InterpretLocaleValue(token,(char **) NULL);
+ affine.ty=StringToDouble(token,(char **) NULL);
break;
}
status=MagickFalse;
if (LocaleCompare("viewbox",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->viewbox.x=(ssize_t) ceil(InterpretLocaleValue(
+ 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(InterpretLocaleValue(
+ 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(
- InterpretLocaleValue(token,(char **) NULL)+0.5);
+ StringToDouble(token,(char **) NULL)+0.5);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
graphic_context[n]->viewbox.height=(size_t) floor(
- InterpretLocaleValue(token,(char **) NULL)+0.5);
+ StringToDouble(token,(char **) NULL)+0.5);
break;
}
status=MagickFalse;
if (IsPoint(q) == MagickFalse)
break;
GetMagickToken(q,&q,token);
- point.x=InterpretLocaleValue(token,(char **) NULL);
+ point.x=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- point.y=InterpretLocaleValue(token,(char **) NULL);
+ point.y=StringToDouble(token,(char **) NULL);
GetMagickToken(q,(const char **) NULL,token);
if (*token == ',')
GetMagickToken(q,&q,token);
double
value;
- value=InterpretLocaleValue(s,&t);
+ value=StringToDouble(s,&t);
(void) value;
if (s == t)
{
(void) CloneString(&draw_info->encoding,option);
option=GetImageOption(image_info,"kerning");
if (option != (const char *) NULL)
- draw_info->kerning=InterpretLocaleValue(option,(char **) NULL);
+ draw_info->kerning=StringToDouble(option,(char **) NULL);
option=GetImageOption(image_info,"interline-spacing");
if (option != (const char *) NULL)
- draw_info->interline_spacing=InterpretLocaleValue(option,
+ draw_info->interline_spacing=StringToDouble(option,
(char **) NULL);
option=GetImageOption(image_info,"interword-spacing");
if (option != (const char *) NULL)
- draw_info->interword_spacing=InterpretLocaleValue(option,
+ draw_info->interword_spacing=StringToDouble(option,
(char **) NULL);
option=GetImageOption(image_info,"direction");
if (option != (const char *) NULL)
exception);
option=GetImageOption(image_info,"strokewidth");
if (option != (const char *) NULL)
- draw_info->stroke_width=InterpretLocaleValue(option,(char **) NULL);
+ draw_info->stroke_width=StringToDouble(option,(char **) NULL);
option=GetImageOption(image_info,"undercolor");
if (option != (const char *) NULL)
(void) QueryColorCompliance(option,AllCompliance,&draw_info->undercolor,
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- arc.x=InterpretLocaleValue(token,(char **) NULL);
+ arc.x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- arc.y=InterpretLocaleValue(token,(char **) NULL);
+ arc.y=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- angle=InterpretLocaleValue(token,(char **) NULL);
+ angle=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(char **) NULL);
end.x=(double) (attribute == (int) 'A' ? x : point.x+x);
end.y=(double) (attribute == (int) 'A' ? y : point.y+y);
TraceArcPath(q,point,end,arc,angle,large_arc,sweep);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(char **) NULL);
end.x=(double) (attribute == (int) 'C' ? x : point.x+x);
end.y=(double) (attribute == (int) 'C' ? y : point.y+y);
points[i]=end;
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
point.x=(double) (attribute == (int) 'H' ? x: point.x+x);
TracePoint(q,point);
q+=q->coordinates;
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(char **) NULL);
point.x=(double) (attribute == (int) 'L' ? x : point.x+x);
point.y=(double) (attribute == (int) 'L' ? y : point.y+y);
TracePoint(q,point);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(char **) NULL);
point.x=(double) (attribute == (int) 'M' ? x : point.x+x);
point.y=(double) (attribute == (int) 'M' ? y : point.y+y);
if (i == 0)
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(char **) NULL);
if (*p == ',')
p++;
end.x=(double) (attribute == (int) 'Q' ? x : point.x+x);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(char **) NULL);
if (*p == ',')
p++;
end.x=(double) (attribute == (int) 'S' ? x : point.x+x);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(char **) NULL);
end.x=(double) (attribute == (int) 'T' ? x : point.x+x);
end.y=(double) (attribute == (int) 'T' ? y : point.y+y);
points[i]=end;
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(char **) NULL);
point.y=(double) (attribute == (int) 'V' ? y : point.y+y);
TracePoint(q,point);
q+=q->coordinates;
{
case 0:
{
- color_correction.red.slope=InterpretLocaleValue(token,
+ color_correction.red.slope=StringToDouble(token,
(char **) NULL);
break;
}
case 1:
{
- color_correction.green.slope=InterpretLocaleValue(token,
+ color_correction.green.slope=StringToDouble(token,
(char **) NULL);
break;
}
case 2:
{
- color_correction.blue.slope=InterpretLocaleValue(token,
+ color_correction.blue.slope=StringToDouble(token,
(char **) NULL);
break;
}
{
case 0:
{
- color_correction.red.offset=InterpretLocaleValue(token,
+ color_correction.red.offset=StringToDouble(token,
(char **) NULL);
break;
}
case 1:
{
- color_correction.green.offset=InterpretLocaleValue(token,
+ color_correction.green.offset=StringToDouble(token,
(char **) NULL);
break;
}
case 2:
{
- color_correction.blue.offset=InterpretLocaleValue(token,
+ color_correction.blue.offset=StringToDouble(token,
(char **) NULL);
break;
}
{
case 0:
{
- color_correction.red.power=InterpretLocaleValue(token,
+ color_correction.red.power=StringToDouble(token,
(char **) NULL);
break;
}
case 1:
{
- color_correction.green.power=InterpretLocaleValue(token,
+ color_correction.green.power=StringToDouble(token,
(char **) NULL);
break;
}
case 2:
{
- color_correction.blue.power=InterpretLocaleValue(token,
+ color_correction.blue.power=StringToDouble(token,
(char **) NULL);
break;
}
content=GetXMLTreeContent(saturation);
p=(const char *) content;
GetMagickToken(p,&p,token);
- color_correction.saturation=InterpretLocaleValue(token,
+ color_correction.saturation=StringToDouble(token,
(char **) NULL);
}
}
(double) channel,symbol);
value=(const char *) GetValueFromSplayTree(fx_info->symbols,key);
if (value != (const char *) NULL)
- return(QuantumScale*InterpretLocaleValue(value,(char **) NULL));
+ return(QuantumScale*StringToDouble(value,(char **) NULL));
(void) DeleteNodeFromSplayTree(fx_info->symbols,key);
if (LocaleNCompare(symbol,"depth",5) == 0)
{
}
(void) AddValueToSplayTree(fx_info->symbols,ConstantString(key),
ConstantString(statistic));
- return(QuantumScale*InterpretLocaleValue(statistic,(char **) NULL));
+ return(QuantumScale*StringToDouble(statistic,(char **) NULL));
}
static MagickRealType
}
value=(const char *) GetValueFromSplayTree(fx_info->symbols,symbol);
if (value != (const char *) NULL)
- return((MagickRealType) InterpretLocaleValue(value,(char **) NULL));
+ return((MagickRealType) StringToDouble(value,(char **) NULL));
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
"UnableToParseExpression","`%s'",symbol);
return(0.0);
break;
}
q=(char *) expression;
- alpha=InterpretLocaleValue(expression,&q);
+ alpha=InterpretSiPrefixValue(expression,&q);
if (q == expression)
return(FxGetSymbol(fx_info,channel,x,y,expression,exception));
return(alpha);
if (*p == '\0')
return(flags);
q=p;
- value=InterpretLocaleValue(p,&q);
+ value=StringToDouble(p,&q);
(void) value;
if (LocaleNCompare(p,"0x",2) == 0)
value=(double) strtol(p,&q,10);
if (LocaleNCompare(p,"0x",2) == 0)
*width=(size_t) strtol(p,&p,10);
else
- *width=(size_t) floor(InterpretLocaleValue(p,&p)+0.5);
+ *width=(size_t) floor(StringToDouble(p,&p)+0.5);
if (p != q)
flags|=WidthValue;
}
Parse height.
*/
q=p;
- *height=(size_t) floor(InterpretLocaleValue(p,&p)+0.5);
+ *height=(size_t) floor(StringToDouble(p,&p)+0.5);
if (p != q)
flags|=HeightValue;
}
if (*p == '-')
flags|=XNegative;
q=p;
- *x=(ssize_t) ceil(InterpretLocaleValue(p,&p)-0.5);
+ *x=(ssize_t) ceil(StringToDouble(p,&p)-0.5);
if (p != q)
flags|=XValue;
if ((*p == '+') || (*p == '-'))
if (*p == '-')
flags|=YNegative;
q=p;
- *y=(ssize_t) ceil(InterpretLocaleValue(p,&p)-0.5);
+ *y=(ssize_t) ceil(StringToDouble(p,&p)-0.5);
if (p != q)
flags|=YValue;
}
if (geometry == (const char *) NULL)
return(MagickFalse);
p=(char *) geometry;
- value=InterpretLocaleValue(geometry,&p);
+ value=StringToDouble(geometry,&p);
(void) value;
if (p == geometry)
return(MagickFalse);
{
case 0:
{
- affine_matrix->sx=InterpretLocaleValue(token,(char **) NULL);
+ affine_matrix->sx=StringToDouble(token,(char **) NULL);
break;
}
case 1:
{
- affine_matrix->rx=InterpretLocaleValue(token,(char **) NULL);
+ affine_matrix->rx=StringToDouble(token,(char **) NULL);
break;
}
case 2:
{
- affine_matrix->ry=InterpretLocaleValue(token,(char **) NULL);
+ affine_matrix->ry=StringToDouble(token,(char **) NULL);
break;
}
case 3:
{
- affine_matrix->sy=InterpretLocaleValue(token,(char **) NULL);
+ affine_matrix->sy=StringToDouble(token,(char **) NULL);
break;
}
case 4:
{
- affine_matrix->tx=InterpretLocaleValue(token,(char **) NULL);
+ affine_matrix->tx=StringToDouble(token,(char **) NULL);
flags|=XValue;
break;
}
case 5:
{
- affine_matrix->ty=InterpretLocaleValue(token,(char **) NULL);
+ affine_matrix->ty=StringToDouble(token,(char **) NULL);
flags|=YValue;
break;
}
if (*p == '\0')
return(flags);
q=p;
- value=InterpretLocaleValue(p,&q);
+ value=StringToDouble(p,&q);
if (LocaleNCompare(p,"0x",2) == 0)
value=(double) strtol(p,&q,10);
c=(int) ((unsigned char) *q);
if (LocaleNCompare(p,"0x",2) == 0)
value=(double) strtol(p,&p,10);
else
- value=InterpretLocaleValue(p,&p);
+ value=StringToDouble(p,&p);
if (p != q)
{
flags|=RhoValue;
(*p != '-')))
{
q=p;
- value=InterpretLocaleValue(p,&p);
+ value=StringToDouble(p,&p);
if (p != q)
{
flags|=SigmaValue;
if ((*p == ',') || (*p == '/') || (*p == ':'))
p++;
q=p;
- value=InterpretLocaleValue(p,&p);
+ value=StringToDouble(p,&p);
if (p != q)
{
flags|=XiValue;
if ((*p == ',') || (*p == '/') || (*p == ':'))
p++;
q=p;
- value=InterpretLocaleValue(p,&p);
+ value=StringToDouble(p,&p);
if (p != q)
{
flags|=PsiValue;
if ((*p == ',') || (*p == '/') || (*p == ':'))
p++;
q=p;
- value=InterpretLocaleValue(p,&p);
+ value=StringToDouble(p,&p);
if (p != q)
{
flags|=ChiValue;
exception);
option=GetImageOption(image_info,"bias");
if (option != (const char *) NULL)
- image->bias=InterpretLocaleInterval(option,QuantumRange);
+ image->bias=StringToDoubleInterval(option,QuantumRange);
option=GetImageOption(image_info,"black-point-compensation");
if (option != (const char *) NULL)
image->black_point_compensation=(MagickBooleanType) ParseCommandOption(
MagickFalse,option);
option=GetImageOption(image_info,"fuzz");
if (option != (const char *) NULL)
- image->fuzz=InterpretLocaleInterval(option,(double) QuantumRange+1.0);
+ image->fuzz=StringToDoubleInterval(option,(double) QuantumRange+1.0);
option=GetImageOption(image_info,"gravity");
if (option != (const char *) NULL)
image->gravity=(GravityType) ParseCommandOption(MagickGravityOptions,
double
value;
- static const double
- SIPrefixes['z'-'E'+1] =
- {
- ['y'-'E'] = (-24.0),
- ['z'-'E'] = (-21.0),
- ['a'-'E'] = (-18.0),
- ['f'-'E'] = (-15.0),
- ['p'-'E'] = (-12.0),
- ['n'-'E'] = (-9.0),
- ['u'-'E'] = (-6.0),
- ['m'-'E'] = (-3.0),
- ['c'-'E'] = (-2.0),
- ['d'-'E'] = (-1.0),
- ['h'-'E'] = 2.0,
- ['k'-'E'] = 3.0,
- ['K'-'E'] = 3.0,
- ['M'-'E'] = 6.0,
- ['G'-'E'] = 9.0,
- ['T'-'E'] = 12.0,
- ['P'-'E'] = 15.0,
- ['E'-'E'] = 18.0,
- ['Z'-'E'] = 21.0,
- ['Y'-'E'] = 24.0
- };
-
if ((*string == '0') && ((string[1] | 0x20)=='x'))
value=(double) strtoul(string,&q,16);
else
value=strtod(string,&q);
#endif
}
- if (q != string)
- {
- if ((*q >= 'E') && (*q <= 'z'))
- {
- double
- e;
-
- e=SIPrefixes[*q-'E'];
- if (e >= MagickEpsilon)
- {
- if (q[1] == 'i')
- {
- value*=pow(2.0,e/0.3);
- q+=2;
- }
- else
- {
- value*=pow(10.0,e);
- q++;
- }
- }
- }
- if (*q == 'B')
- {
- value*=8.0;
- q++;
- }
- }
if (sentinal != (char **) NULL)
*sentinal=q;
return(value);
kernel->values[i] = nan; /* do not include this value in kernel */
}
else {
- kernel->values[i] = InterpretLocaleValue(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=InterpretLocaleInterval(value,QuantumRange);
+ image->bias=StringToDoubleInterval(value,QuantumRange);
break;
}
status=AddValueToSplayTree((SplayTreeInfo *) image->properties,
MagickQuantumFormatOptions,MagickFalse,option);
option=GetImageOption(image_info,"quantum:minimum");
if (option != (char *) NULL)
- quantum_info->minimum=InterpretLocaleValue(option,(char **) NULL);
+ quantum_info->minimum=StringToDouble(option,(char **) NULL);
option=GetImageOption(image_info,"quantum:maximum");
if (option != (char *) NULL)
- quantum_info->maximum=InterpretLocaleValue(option,(char **) NULL);
+ quantum_info->maximum=StringToDouble(option,(char **) NULL);
if ((quantum_info->minimum == 0.0) && (quantum_info->maximum == 0.0))
quantum_info->scale=0.0;
else
quantum_info->minimum);
option=GetImageOption(image_info,"quantum:scale");
if (option != (char *) NULL)
- quantum_info->scale=InterpretLocaleValue(option,(char **) NULL);
+ quantum_info->scale=StringToDouble(option,(char **) NULL);
option=GetImageOption(image_info,"quantum:polarity");
if (option != (char *) NULL)
quantum_info->min_is_white=LocaleCompare(option,"min-is-white") == 0 ?
}
artifact=GetImageArtifact(image,"filter:sigma");
if (artifact != (const char *) NULL)
- sigma=InterpretLocaleValue(artifact,(char **) NULL); /* override sigma */
+ sigma=StringToDouble(artifact,(char **) NULL); /* override sigma */
if (GaussianFilter)
{
/*
}
artifact=GetImageArtifact(image,"filter:blur");
if (artifact != (const char *) NULL)
- resize_filter->blur*=InterpretLocaleValue(artifact,
- (char **) NULL); /* override blur */
+ resize_filter->blur*=StringToDouble(artifact,(char **) NULL); /* override blur */
if (resize_filter->blur < MagickEpsilon)
resize_filter->blur=(MagickRealType) MagickEpsilon;
artifact=GetImageArtifact(image,"filter:lobes");
if (artifact != (const char *) NULL)
{
+ ssize_t
+ lobes;
+
/*
Override lobes.
*/
- ssize_t lobes=(ssize_t) StringToLong(artifact);
+ lobes=(ssize_t) StringToLong(artifact);
if (lobes < 1)
lobes=1;
resize_filter->support=(MagickRealType) lobes;
}
artifact=GetImageArtifact(image,"filter:support");
if (artifact != (const char *) NULL)
- resize_filter->support=fabs(InterpretLocaleValue(artifact,
+ resize_filter->support=fabs(StringToDouble(artifact,
(char **) NULL)); /* override support */
/*
Scale windowing function separately to the support 'clipping' window that
resize_filter->window_support=resize_filter->support; /* default */
artifact=GetImageArtifact(image,"filter:win-support");
if (artifact != (const char *) NULL)
- resize_filter->window_support=fabs(InterpretLocaleValue(artifact,
+ resize_filter->window_support=fabs(StringToDouble(artifact,
(char **) NULL));
/*
Adjust window function scaling to match windowing support for weighting
artifact=GetImageArtifact(image,"filter:b");
if (artifact != (const char *) NULL)
{
- B=InterpretLocaleValue(artifact,(char **) NULL);
+ B=StringToDouble(artifact,(char **) NULL);
C=(1.0-B)/2.0; /* Calculate C to get a Keys cubic filter. */
artifact=GetImageArtifact(image,"filter:c"); /* user C override */
if (artifact != (const char *) NULL)
- C=InterpretLocaleValue(artifact,(char **) NULL);
+ C=StringToDouble(artifact,(char **) NULL);
}
else
{
artifact=GetImageArtifact(image,"filter:c");
if (artifact != (const char *) NULL)
{
- C=InterpretLocaleValue(artifact,(char **) NULL);
+ C=StringToDouble(artifact,(char **) NULL);
B=1.0-2.0*C; /* Calculate B to get a Keys cubic filter. */
}
}
double
value;
- value=InterpretLocaleInterval(string,interval);
+ value=StringToDoubleInterval(string,interval);
if (value >= (double) MagickULLConstant(~0))
return(MagickULLConstant(~0));
return((MagickSizeType) value);
extern "C" {
#endif
-static inline double InterpretLocaleInterval(const char *string,
+#include <MagickCore/locale_.h>
+
+static inline double StringToDouble(const char *restrict string,
+ char **restrict sentinal)
+{
+ return(InterpretLocaleValue(string,sentinal));
+}
+
+static inline double StringToDoubleInterval(const char *string,
const double interval)
{
char
double
value;
- /*
- Interpret string with International System of Units (SI) unit prefix.
- */
- value=InterpretLocaleValue(string,&q);
+ value=InterpretSiPrefixValue(string,&q);
if (*q == '%')
value*=interval/100.0;
return(value);
}
-static inline int StringToInteger(const char *value)
+static inline int StringToInteger(const char *restrict value)
{
return((int) strtol(value,(char **) NULL,10));
}
-static inline long StringToLong(const char *value)
+static inline long StringToLong(const char *restrict value)
{
return(strtol(value,(char **) NULL,10));
}
-static inline unsigned long StringToUnsignedLong(const char *value)
+static inline unsigned long StringToUnsignedLong(const char *restrict value)
{
return(strtoul(value,(char **) NULL,10));
}
% %
% %
% %
++ I n t e r p r e t S i P r e f i x V a l u e %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InterpretSiPrefixValue() converts the initial portion of the string to a
+% double representation. It also recognizes SI prefixes (e.g. B, KB, MiB,
+% etc.).
+%
+% The format of the InterpretSiPrefixValue method is:
+%
+% double InterpretSiPrefixValue(const char *value,char **sentinal)
+%
+% A description of each parameter follows:
+%
+% o value: the string value.
+%
+% o sentinal: if sentinal is not NULL, return a pointer to the character
+% after the last character used in the conversion.
+%
+*/
+MagickExport double InterpretSiPrefixValue(const char *restrict string,
+ char **restrict sentinal)
+{
+ char
+ *q;
+
+ double
+ value;
+
+ static const double
+ SIPrefixes['z'-'E'+1] =
+ {
+ ['y'-'E'] = (-24.0),
+ ['z'-'E'] = (-21.0),
+ ['a'-'E'] = (-18.0),
+ ['f'-'E'] = (-15.0),
+ ['p'-'E'] = (-12.0),
+ ['n'-'E'] = (-9.0),
+ ['u'-'E'] = (-6.0),
+ ['m'-'E'] = (-3.0),
+ ['c'-'E'] = (-2.0),
+ ['d'-'E'] = (-1.0),
+ ['h'-'E'] = 2.0,
+ ['k'-'E'] = 3.0,
+ ['K'-'E'] = 3.0,
+ ['M'-'E'] = 6.0,
+ ['G'-'E'] = 9.0,
+ ['T'-'E'] = 12.0,
+ ['P'-'E'] = 15.0,
+ ['E'-'E'] = 18.0,
+ ['Z'-'E'] = 21.0,
+ ['Y'-'E'] = 24.0
+ };
+
+ value=InterpretLocaleValue(string,&q);
+ if (q != string)
+ {
+ if ((*q >= 'E') && (*q <= 'z'))
+ {
+ double
+ e;
+
+ e=SIPrefixes[*q-'E'];
+ if (e >= MagickEpsilon)
+ {
+ if (q[1] == 'i')
+ {
+ value*=pow(2.0,e/0.3);
+ q+=2;
+ }
+ else
+ {
+ value*=pow(10.0,e);
+ q++;
+ }
+ }
+ }
+ if (*q == 'B')
+ {
+ value*=8.0;
+ q++;
+ }
+ }
+ if (sentinal != (char **) NULL)
+ *sentinal=q;
+ return(value);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% L o c a l e C o m p a r e %
% %
% %
extern MagickExport const char
*GetStringInfoPath(const StringInfo *);
+extern MagickExport double
+ InterpretSiPrefixValue(const char *restrict,char **restrict);
+
extern MagickExport int
CompareStringInfo(const StringInfo *,const StringInfo *),
LocaleCompare(const char *,const char *),
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- levels[i]=InterpretLocaleValue(token,(char **) NULL);
+ levels[i]=StringToDouble(token,(char **) NULL);
}
for (i=0; i < MaxPixelChannels; i++)
if (fabs(levels[i]) >= 1)
char
*q;
- value=InterpretLocaleValue(p,&q);
+ value=StringToDouble(p,&q);
(void) value;
if ((p != q) && (*p != ','))
{
i++;
if (i == (ssize_t) argc)
ThrowAnimateException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowAnimateInvalidArgumentException(option,argv[i]);
if (*option == '+')
dissimilarity_threshold=DefaultDissimilarityThreshold;
else
- dissimilarity_threshold=InterpretLocaleValue(argv[i],
+ dissimilarity_threshold=StringToDouble(argv[i],
(char **) NULL);
break;
}
i++;
if (i == (ssize_t) argc)
ThrowCompareException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowCompareInvalidArgumentException(option,argv[i]);
i++;
if (i == (ssize_t) argc)
ThrowCompositeException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowCompositeInvalidArgumentException(option,argv[i]);
i++;
if (i == (ssize_t) argc)
ThrowConvertException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowConvertInvalidArgumentException(option,argv[i]);
i++;
if (i == (ssize_t) argc)
ThrowDisplayException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowDisplayInvalidArgumentException(option,argv[i]);
i++;
if (i == (ssize_t) argc)
ThrowDisplayException(OptionError,"MissingArgument",option);
- if (InterpretLocaleValue(argv[i],(char **) NULL) != 0)
+ if (StringToDouble(argv[i],(char **) NULL) != 0)
resource_info.window_group=argv[i];
break;
}
value=GetXMLTreeContent(child);
if (value != (const char *) NULL)
CurrentContext->fill.alpha=ClampToQuantum((MagickRealType)
- QuantumRange*(1.0-InterpretLocaleValue(value,(char **) NULL)));
+ QuantumRange*(1.0-StringToDouble(value,(char **) NULL)));
}
child=GetXMLTreeChild(xml_info,"fill-rule");
if (child != (XMLTreeInfo *) NULL)
{
value=GetXMLTreeContent(child);
if (value != (const char *) NULL)
- CurrentContext->pointsize=InterpretLocaleValue(value,(char **) NULL);
+ CurrentContext->pointsize=StringToDouble(value,(char **) NULL);
}
child=GetXMLTreeChild(xml_info,"font-stretch");
if (child != (XMLTreeInfo *) NULL)
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- CurrentContext->dash_pattern[j]=InterpretLocaleValue(token,
+ CurrentContext->dash_pattern[j]=StringToDouble(token,
(char **) NULL);
}
if ((x & 0x01) != 0)
{
value=GetXMLTreeContent(child);
if (value != (const char *) NULL)
- CurrentContext->dash_offset=InterpretLocaleValue(value,(char **) NULL);
+ CurrentContext->dash_offset=StringToDouble(value,(char **) NULL);
}
child=GetXMLTreeChild(xml_info,"stroke-linecap");
if (child != (XMLTreeInfo *) NULL)
value=GetXMLTreeContent(child);
if (value != (const char *) NULL)
CurrentContext->stroke.alpha=ClampToQuantum((MagickRealType)
- QuantumRange*(1.0-InterpretLocaleValue(value,(char **) NULL)));
+ QuantumRange*(1.0-StringToDouble(value,(char **) NULL)));
}
child=GetXMLTreeChild(xml_info,"stroke-width");
if (child != (XMLTreeInfo *) NULL)
{
value=GetXMLTreeContent(child);
if (value != (const char *) NULL)
- CurrentContext->stroke_width=InterpretLocaleValue(value,(char **) NULL);
+ CurrentContext->stroke_width=StringToDouble(value,(char **) NULL);
}
child=GetXMLTreeChild(xml_info,"text-align");
if (child != (XMLTreeInfo *) NULL)
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowIdentifyInvalidArgumentException(option,argv[i]);
i++;
if (i == (ssize_t) argc)
ThrowImportException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowImportInvalidArgumentException(option,argv[i]);
while (((int) *p != 0) && ((isspace((int) ((unsigned char) *p)) != 0) ||
(*p == ',')))
p++;
- sampling_factors[i]=InterpretLocaleValue(p,(char **) NULL);
+ sampling_factors[i]=StringToDouble(p,(char **) NULL);
i++;
}
*number_factors=(size_t) i;
if (LocaleCompare("debug",option+1) == 0)
(void) SetLogEventMask(argv[++i]);
if (LocaleCompare("duration",option+1) == 0)
- duration=InterpretLocaleValue(argv[++i],(char **) NULL);
+ duration=StringToDouble(argv[++i],(char **) NULL);
if (LocaleCompare("regard-warnings",option+1) == 0)
regard_warnings=MagickTrue;
}
error = MagickTrue;
break;
}
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* Y coordinate */
token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' ) break;
error = MagickTrue;
break;
}
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* color values for this control point */
#if 0
if ( (color_from_image ) {
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
}
attenuate=1.0;
break;
}
- attenuate=InterpretLocaleValue(argv[i+1],(char **) NULL);
+ attenuate=StringToDouble(argv[i+1],(char **) NULL);
break;
}
if (LocaleCompare("auto-gamma",option+1) == 0)
if (*option == '+')
threshold=40.0*QuantumRange/100.0;
else
- threshold=InterpretLocaleInterval(argv[i+1],QuantumRange);
+ threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
mogrify_image=DeskewImage(*image,threshold,exception);
break;
}
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- arguments[x]=InterpretLocaleValue(token,(char **) NULL);
+ arguments[x]=StringToDouble(token,(char **) NULL);
}
args=DestroyString(args);
mogrify_image=DistortImage(*image,method,number_arguments,arguments,
(void) SyncImageSettings(mogrify_info,*image,exception);
op=(MagickEvaluateOperator) ParseCommandOption(
MagickEvaluateOptions,MagickFalse,argv[i+1]);
- constant=InterpretLocaleInterval(argv[i+2],QuantumRange);
+ constant=StringToDoubleInterval(argv[i+2],QuantumRange);
(void) EvaluateImage(*image,op,constant,exception);
break;
}
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- parameters[x]=InterpretLocaleValue(token,(char **) NULL);
+ parameters[x]=StringToDouble(token,(char **) NULL);
}
arguments=DestroyString(arguments);
(void) FunctionImage(*image,function,number_parameters,parameters,
*/
(void) SyncImageSettings(mogrify_info,*image,exception);
if (*option == '+')
- (*image)->gamma=InterpretLocaleValue(argv[i+1],(char **) NULL);
+ (*image)->gamma=StringToDouble(argv[i+1],(char **) NULL);
else
- (void) GammaImage(*image,InterpretLocaleValue(argv[i+1],
+ (void) GammaImage(*image,StringToDouble(argv[i+1],
(char **) NULL),exception);
break;
}
}
if (LocaleCompare("linewidth",option+1) == 0)
{
- draw_info->stroke_width=InterpretLocaleValue(argv[i+1],
+ draw_info->stroke_width=StringToDouble(argv[i+1],
(char **) NULL);
break;
}
Sepia-tone image.
*/
(void) SyncImageSettings(mogrify_info,*image,exception);
- threshold=InterpretLocaleInterval(argv[i+1],QuantumRange);
+ threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
mogrify_image=SepiaToneImage(*image,threshold,exception);
break;
}
threshold;
(void) SyncImageSettings(mogrify_info,*image,exception);
- threshold=InterpretLocaleInterval(argv[i+1],QuantumRange);
+ threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
(void) SolarizeImage(*image,threshold,exception);
break;
}
}
if (LocaleCompare("strokewidth",option+1) == 0)
{
- draw_info->stroke_width=InterpretLocaleValue(argv[i+1],
+ draw_info->stroke_width=StringToDouble(argv[i+1],
(char **) NULL);
break;
}
if (*option == '+')
threshold=(double) QuantumRange/2;
else
- threshold=InterpretLocaleInterval(argv[i+1],QuantumRange);
+ threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
(void) BilevelImage(*image,threshold,exception);
break;
}
i++;
if (i == (ssize_t) argc)
ThrowMogrifyException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowMogrifyInvalidArgumentException(option,argv[i]);
limit=MagickResourceInfinity;
if (LocaleCompare("unlimited",argv[i+1]) != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(argv[i+1],100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(argv[i+1],100.0);
(void) SetMagickResourceLimit(MemoryResource,limit);
(void) SetMagickResourceLimit(MapResource,2*limit);
break;
(void) SetImageOption(image_info,option+1,"0");
break;
}
- image_info->fuzz=InterpretLocaleInterval(argv[i+1],(double) QuantumRange+
- 1.0);
+ image_info->fuzz=StringToDoubleInterval(argv[i+1],(double)
+ QuantumRange+1.0);
(void) SetImageOption(image_info,option+1,argv[i+1]);
break;
}
MagickFalse,argv[i+1]);
limit=MagickResourceInfinity;
if (LocaleCompare("unlimited",argv[i+2]) != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(argv[i+2],100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(argv[i+2],100.0);
(void) SetMagickResourceLimit(type,limit);
break;
}
i++;
if (i == (ssize_t) argc)
ThrowMontageException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowMontageInvalidArgumentException(option,argv[i]);
ThrowMontageException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowMontageInvalidArgumentException(option,argv[i]);
- montage_info->pointsize=InterpretLocaleValue(argv[i],
+ montage_info->pointsize=StringToDouble(argv[i],
(char **) NULL);
break;
}
error = MagickTrue;
break;
}
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* Y coordinate */
token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' ) break;
error = MagickTrue;
break;
}
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* color values for this control point */
#if 0
if ( (color_from_image ) {
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
while ( token[0] == ',' ) GetMagickToken(p,&p,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
- sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+ sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
token[0] = ','; /* used this token - get another */
}
}
limit=MagickResourceInfinity;
if (LocaleCompare("unlimited",arg) != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(arg,100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(arg,100.0);
(void) SetMagickResourceLimit(MemoryResource,limit);
(void) SetMagickResourceLimit(MapResource,2*limit);
break;
*/
if (IfSetOption)
{
- image_info->fuzz=InterpretLocaleInterval(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=InterpretLocaleValue(value,
+ draw_info->interline_spacing=StringToDouble(value,
(char **) NULL);
break;
}
value = IfSetOption ? arg : "0"; /* undefined? */
(void) SetImageOption(image_info,option, value);
- draw_info->interword_spacing=InterpretLocaleValue(value,
+ draw_info->interword_spacing=StringToDouble(value,
(char **) NULL);
break;
}
value = IfSetOption ? arg : "0"; /* undefined? */
(void) SetImageOption(image_info,option, value);
- draw_info->kerning=InterpretLocaleValue(value,(char **) NULL);
+ draw_info->kerning=StringToDouble(value,(char **) NULL);
break;
}
break;
MagickFalse,arg);
limit=MagickResourceInfinity;
if (LocaleCompare("unlimited",argv[2]) != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(argv[2],100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(argv[2],100.0);
(void) SetMagickResourceLimit(type,limit);
break;
}
value=12.0;
if (IfSetOption)
- InterpretLocaleValue(arg,(char **) NULL);
+ StringToDouble(arg,(char **) NULL);
image_info->pointsize=draw_info->pointsize=value;
break;
}
const char
*value = IfSetOption ? arg : "1.0";
(void) SetImageOption(image_info,option,value);
- draw_info->stroke_width=InterpretLocaleValue(value,(char **) NULL);
+ draw_info->stroke_width=StringToDouble(value,(char **) NULL);
break;
}
if (LocaleCompare("style",option) == 0)
if (*argv[0] == '+')
threshold=40.0*QuantumRange/100.0;
else
- threshold=InterpretLocaleInterval(args[0],QuantumRange);
+ threshold=StringToDoubleInterval(args[0],QuantumRange);
new_image=DeskewImage(*image,threshold,exception);
break;
}
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- arguments[x]=InterpretLocaleValue(token,(char **) NULL);
+ arguments[x]=StringToDouble(token,(char **) NULL);
}
args=DestroyString(args);
new_image=DistortImage(*image,method,number_arguments,arguments,
(void) SyncImageSettings(image_info,*image,exception);
op=(MagickEvaluateOperator) ParseCommandOption(
MagickEvaluateOptions,MagickFalse,args[0]);
- constant=InterpretLocaleInterval(argv[2],QuantumRange);
+ constant=StringToDoubleInterval(argv[2],QuantumRange);
(void) EvaluateImage(*image,op,constant,exception);
break;
}
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- parameters[x]=InterpretLocaleValue(token,(char **) NULL);
+ parameters[x]=StringToDouble(token,(char **) NULL);
}
arguments=DestroyString(arguments);
(void) FunctionImage(*image,function,number_parameters,parameters,
{
(void) SyncImageSettings(image_info,*image,exception);
if (*argv[0] == '+')
- (*image)->gamma=InterpretLocaleValue(args[0],(char **) NULL);
+ (*image)->gamma=StringToDouble(args[0],(char **) NULL);
else
- (void) GammaImage(*image,InterpretLocaleValue(args[0],
+ (void) GammaImage(*image,StringToDouble(args[0],
(char **) NULL),exception);
break;
}
}
if (LocaleCompare("linewidth",option) == 0)
{
- draw_info->stroke_width=InterpretLocaleValue(args[0],
+ draw_info->stroke_width=StringToDouble(args[0],
(char **) NULL);
break;
}
threshold;
(void) SyncImageSettings(image_info,*image,exception);
- threshold=InterpretLocaleInterval(args[0],QuantumRange);
+ threshold=StringToDoubleInterval(args[0],QuantumRange);
new_image=SepiaToneImage(*image,threshold,exception);
break;
}
threshold;
(void) SyncImageSettings(image_info,*image,exception);
- threshold=InterpretLocaleInterval(args[0],QuantumRange);
+ threshold=StringToDoubleInterval(args[0],QuantumRange);
(void) SolarizeImage(*image,threshold,exception);
break;
}
if (*argv[0] == '+')
threshold=(double) QuantumRange/2;
else
- threshold=InterpretLocaleInterval(args[0],QuantumRange);
+ threshold=StringToDoubleInterval(args[0],QuantumRange);
(void) BilevelImage(*image,threshold,exception);
break;
}
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowStreamInvalidArgumentException(option,argv[i]);
%
*/
-static double InterpretLocaleInterval(const char *string,const double interval)
+static double StringToDoubleInterval(const char *string,const double interval)
{
char
*q;
scale,
value;
- value=InterpretLocaleValue(string,&q);
+ value=StringToDouble(string,&q);
scale=1000.0;
if ((*q != '\0') && (tolower((int) ((unsigned char) *(q+1))) == 'i'))
scale=1024.0;
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
(void) SetMagickResourceLimit(AreaResource,limit);
break;
}
if (LocaleCompare(attribute,"bias") == 0)
{
for ( ; image; image=image->next)
- image->bias=InterpretLocaleInterval(SvPV(sval,na),QuantumRange);
+ image->bias=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
break;
}
if (LocaleCompare(attribute,"blue-primary") == 0)
if (LocaleCompare(attribute,"cache-threshold") == 0)
{
(void) SetMagickResourceLimit(MemoryResource,(MagickSizeType)
- InterpretLocaleInterval(SvPV(sval,na),100.0));
+ StringToDoubleInterval(SvPV(sval,na),100.0));
(void) SetMagickResourceLimit(MapResource,(MagickSizeType)
- (2*InterpretLocaleInterval(SvPV(sval,na),100.0)));
+ (2*StringToDoubleInterval(SvPV(sval,na),100.0)));
break;
}
if (LocaleCompare(attribute,"clip-mask") == 0)
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
(void) SetMagickResourceLimit(DiskResource,limit);
break;
}
if (LocaleCompare(attribute,"fuzz") == 0)
{
if (info)
- info->image_info->fuzz=InterpretLocaleInterval(SvPV(sval,na),QuantumRange);
+ info->image_info->fuzz=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
for ( ; image; image=image->next)
- image->fuzz=InterpretLocaleInterval(SvPV(sval,na),QuantumRange);
+ image->fuzz=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
break;
}
if (info)
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
(void) SetMagickResourceLimit(MapResource,limit);
break;
}
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
(void) SetMagickResourceLimit(MemoryResource,limit);
break;
}
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
(void) SetMagickResourceLimit(ThreadResource,limit);
break;
}
limit=MagickResourceInfinity;
if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
- limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
(void) SetMagickResourceLimit(TimeResource,limit);
break;
}
{
if (LocaleCompare(attribute,"fuzz") == 0)
{
- image->fuzz=InterpretLocaleInterval(SvPV(ST(i),na),100.0);
+ image->fuzz=StringToDoubleInterval(SvPV(ST(i),na),100.0);
break;
}
ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
geometry.y=argument_list[4].integer_reference;
if (attribute_flag[5] != 0)
image->fuzz=
- InterpretLocaleInterval(argument_list[5].string_reference,QuantumRange);
+ StringToDoubleInterval(argument_list[5].string_reference,QuantumRange);
image=CropImage(image,&geometry,exception);
break;
}
invert=MagickTrue;
}
if (attribute_flag[5] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
QuantumRange);
if (attribute_flag[6] != 0)
invert=(MagickBooleanType) argument_list[6].integer_reference;
{
if (compose != DissolveCompositeOp)
(void) SetImageAlpha(composite_image,(Quantum)
- InterpretLocaleInterval(argument_list[6].string_reference,
+ StringToDoubleInterval(argument_list[6].string_reference,
QuantumRange),exception);
else
{
*/
(void) CloneString(&image->geometry,
argument_list[6].string_reference);
- opacity=(Quantum) InterpretLocaleInterval(
+ opacity=(Quantum) StringToDoubleInterval(
argument_list[6].string_reference,QuantumRange);
if (composite_image->matte != MagickTrue)
(void) SetImageAlpha(composite_image,OpaqueAlpha,exception);
(double) argument_list[4].real_reference);
argument_list[0].string_reference=message;
}
- (void) GammaImage(image,InterpretLocaleValue(
+ (void) GammaImage(image,StringToDouble(
argument_list[0].string_reference,(char **) NULL),exception);
break;
}
QueryColorCompliance(argument_list[4].string_reference,
AllCompliance,&target,exception);
if (attribute_flag[3] != 0)
- target.alpha=InterpretLocaleInterval(argument_list[3].string_reference,
+ target.alpha=StringToDoubleInterval(argument_list[3].string_reference,
QuantumRange);
if (attribute_flag[5] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
QuantumRange);
invert=MagickFalse;
if (attribute_flag[6] != 0)
(void) QueryColorCompliance(argument_list[1].string_reference,
AllCompliance,&fill_color,exception);
if (attribute_flag[2] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[2].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[2].string_reference,
QuantumRange);
if (attribute_flag[3] != 0)
channel=(ChannelType) argument_list[3].integer_reference;
flags=ParseGeometry(argument_list[0].string_reference,
&geometry_info);
if (attribute_flag[1] != 0)
- geometry_info.rho=InterpretLocaleInterval(
+ geometry_info.rho=StringToDoubleInterval(
argument_list[1].string_reference,QuantumRange);
(void) SolarizeImage(image,geometry_info.rho,exception);
break;
AllCompliance,&target,exception);
opacity=TransparentAlpha;
if (attribute_flag[1] != 0)
- opacity=InterpretLocaleInterval(argument_list[1].string_reference,
+ opacity=StringToDoubleInterval(argument_list[1].string_reference,
QuantumRange);
if (attribute_flag[2] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[2].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[2].string_reference,
QuantumRange);
if (attribute_flag[3] == 0)
argument_list[3].integer_reference=0;
argument_list[0].string_reference="50%";
if (attribute_flag[1] != 0)
channel=(ChannelType) argument_list[1].integer_reference;
- threshold=InterpretLocaleInterval(argument_list[0].string_reference,
+ threshold=StringToDoubleInterval(argument_list[0].string_reference,
QuantumRange);
channel_mask=SetPixelChannelMask(image,channel);
(void) BilevelImage(image,threshold,exception);
case 59: /* Trim */
{
if (attribute_flag[0] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[0].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[0].string_reference,
QuantumRange);
image=TrimImage(image,exception);
break;
if (attribute_flag[1] != 0)
channel=(ChannelType) argument_list[1].integer_reference;
if (attribute_flag[2] != 0)
- image->bias=InterpretLocaleInterval(argument_list[2].string_reference,
+ image->bias=StringToDoubleInterval(argument_list[2].string_reference,
QuantumRange);
if (attribute_flag[3] != 0)
{
goto PerlException;
}
if (attribute_flag[1] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[1].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[1].string_reference,
QuantumRange);
(void) IsImagesEqual(image,argument_list[0].image_reference,
exception);
if (attribute_flag[4] != 0)
geometry.y=argument_list[4].integer_reference;
if (attribute_flag[5] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
QuantumRange);
if (attribute_flag[6] != 0)
(void) QueryColorCompliance(argument_list[6].string_reference,
if (attribute_flag[4] != 0)
geometry.y=argument_list[4].integer_reference;
if (attribute_flag[5] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
QuantumRange);
if (attribute_flag[6] != 0)
(void) QueryColorCompliance(argument_list[6].string_reference,
QueryColorCompliance(argument_list[4].string_reference,
AllCompliance,&target,exception);
if (attribute_flag[5] != 0)
- image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+ image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
QuantumRange);
if (attribute_flag[6] != 0)
channel=(ChannelType) argument_list[6].integer_reference;
flags=ParseGeometry(argument_list[0].string_reference,
&geometry_info);
if (attribute_flag[1] != 0)
- geometry_info.rho=InterpretLocaleInterval(
+ geometry_info.rho=StringToDoubleInterval(
argument_list[1].string_reference,QuantumRange);
image=DeskewImage(image,geometry_info.rho,exception);
break;
cin.origination.x_pitch=0.0f;
value=GetCINProperty(image_info,image,"dpx:origination.x_pitch",exception);
if (value != (const char *) NULL)
- cin.origination.x_pitch=InterpretLocaleValue(value,(char **) NULL);
+ cin.origination.x_pitch=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,cin.origination.x_pitch);
cin.origination.y_pitch=0.0f;
value=GetCINProperty(image_info,image,"dpx:origination.y_pitch",exception);
if (value != (const char *) NULL)
- cin.origination.y_pitch=InterpretLocaleValue(value,(char **) NULL);
+ cin.origination.y_pitch=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,cin.origination.y_pitch);
cin.origination.gamma=image->gamma;
offset+=WriteBlobFloat(image,cin.origination.gamma);
cin.film.frame_rate=0.0f;
value=GetCINProperty(image_info,image,"dpx:film.frame_rate",exception);
if (value != (const char *) NULL)
- cin.film.frame_rate=InterpretLocaleValue(value,(char **) NULL);
+ cin.film.frame_rate=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,cin.film.frame_rate);
value=GetCINProperty(image_info,image,"dpx:film.frame_id",exception);
if (value != (const char *) NULL)
dpx.orientation.x_center=0.0f;
value=GetDPXProperty(image_info,image,"dpx:orientation.x_center",exception);
if (value != (const char *) NULL)
- dpx.orientation.x_center=InterpretLocaleValue(value,(char **) NULL);
+ dpx.orientation.x_center=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.orientation.x_center);
dpx.orientation.y_center=0.0f;
value=GetDPXProperty(image_info,image,"dpx:orientation.y_center",exception);
if (value != (const char *) NULL)
- dpx.orientation.y_center=InterpretLocaleValue(value,(char **) NULL);
+ dpx.orientation.y_center=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.orientation.y_center);
dpx.orientation.x_size=0U;
value=GetDPXProperty(image_info,image,"dpx:orientation.x_size",exception);
dpx.film.frame_rate=0.0f;
value=GetDPXProperty(image_info,image,"dpx:film.frame_rate",exception);
if (value != (const char *) NULL)
- dpx.film.frame_rate=InterpretLocaleValue(value,(char **) NULL);
+ dpx.film.frame_rate=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.film.frame_rate);
dpx.film.shutter_angle=0.0f;
value=GetDPXProperty(image_info,image,"dpx:film.shutter_angle",exception);
if (value != (const char *) NULL)
- dpx.film.shutter_angle=InterpretLocaleValue(value,(char **) NULL);
+ dpx.film.shutter_angle=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.film.shutter_angle);
*dpx.film.frame_id='\0';
value=GetDPXProperty(image_info,image,"dpx:film.frame_id",exception);
value=GetDPXProperty(image_info,image,
"dpx:television.horizontal_sample_rate",exception);
if (value != (const char *) NULL)
- dpx.television.horizontal_sample_rate=InterpretLocaleValue(value,
+ dpx.television.horizontal_sample_rate=StringToDouble(value,
(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.horizontal_sample_rate);
dpx.television.vertical_sample_rate=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.vertical_sample_rate",
exception);
if (value != (const char *) NULL)
- dpx.television.vertical_sample_rate=InterpretLocaleValue(value,
+ dpx.television.vertical_sample_rate=StringToDouble(value,
(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.vertical_sample_rate);
dpx.television.frame_rate=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.frame_rate",exception);
if (value != (const char *) NULL)
- dpx.television.frame_rate=InterpretLocaleValue(value,(char **) NULL);
+ dpx.television.frame_rate=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.frame_rate);
dpx.television.time_offset=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.time_offset",exception);
if (value != (const char *) NULL)
- dpx.television.time_offset=InterpretLocaleValue(value,(char **) NULL);
+ dpx.television.time_offset=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.time_offset);
dpx.television.gamma=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.gamma",exception);
if (value != (const char *) NULL)
- dpx.television.gamma=InterpretLocaleValue(value,(char **) NULL);
+ dpx.television.gamma=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.gamma);
dpx.television.black_level=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.black_level",exception);
if (value != (const char *) NULL)
- dpx.television.black_level=InterpretLocaleValue(value,(char **) NULL);
+ dpx.television.black_level=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.black_level);
dpx.television.black_gain=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.black_gain",exception);
if (value != (const char *) NULL)
- dpx.television.black_gain=InterpretLocaleValue(value,(char **) NULL);
+ dpx.television.black_gain=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.black_gain);
dpx.television.break_point=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.break_point",exception);
if (value != (const char *) NULL)
- dpx.television.break_point=InterpretLocaleValue(value,(char **) NULL);
+ dpx.television.break_point=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.break_point);
dpx.television.white_level=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.white_level",exception);
if (value != (const char *) NULL)
- dpx.television.white_level=InterpretLocaleValue(value,(char **) NULL);
+ dpx.television.white_level=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.white_level);
dpx.television.integration_times=0.0f;
value=GetDPXProperty(image_info,image,"dpx:television.integration_times",
exception);
if (value != (const char *) NULL)
- dpx.television.integration_times=InterpretLocaleValue(value,(char **) NULL);
+ dpx.television.integration_times=StringToDouble(value,(char **) NULL);
offset+=WriteBlobFloat(image,dpx.television.integration_times);
offset+=WriteBlob(image,sizeof(dpx.television.reserve),(unsigned char *)
dpx.television.reserve);
if (LocaleCompare(keyword,"naxis3") == 0)
fits_info.number_planes=StringToLong(p);
if (LocaleCompare(keyword,"datamax") == 0)
- fits_info.max_data=InterpretLocaleValue(p,(char **) NULL);
+ fits_info.max_data=StringToDouble(p,(char **) NULL);
if (LocaleCompare(keyword,"datamin") == 0)
- fits_info.min_data=InterpretLocaleValue(p,(char **) NULL);
+ fits_info.min_data=StringToDouble(p,(char **) NULL);
if (LocaleCompare(keyword,"bzero") == 0)
- fits_info.zero=InterpretLocaleValue(p,(char **) NULL);
+ fits_info.zero=StringToDouble(p,(char **) NULL);
if (LocaleCompare(keyword,"bscale") == 0)
- fits_info.scale=InterpretLocaleValue(p,(char **) NULL);
+ fits_info.scale=StringToDouble(p,(char **) NULL);
if (LocaleCompare(keyword,"comment") == 0)
{
if (comment == (char *) NULL)
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- image->gamma=InterpretLocaleValue(value,(char **) NULL);
+ image->gamma=StringToDouble(value,(char **) NULL);
break;
}
(void) FormatLocaleString(tag,MaxTextExtent,"hdr:%s",keyword);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- version=InterpretLocaleValue(JBG_VERSION,(char **) NULL);
+ version=StringToDouble(JBG_VERSION,(char **) NULL);
scene=0;
do
{
Search for compression quality that does not exceed image extent.
*/
jpeg_info->quality=0;
- extent=(MagickSizeType) InterpretLocaleInterval(option,100.0);
+ extent=(MagickSizeType) StringToDoubleInterval(option,100.0);
(void) DeleteImageOption(jpeg_info,"jpeg:extent");
(void) AcquireUniqueFilename(jpeg_image->filename);
maximum=101;
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- image->gamma=InterpretLocaleValue(options,(char **) NULL);
+ image->gamma=StringToDouble(options,(char **) NULL);
break;
}
if (LocaleCompare(keyword,"gravity") == 0)
{
if (LocaleCompare(keyword,"version") == 0)
{
- version=InterpretLocaleValue(options,(char **) NULL);
+ version=StringToDouble(options,(char **) NULL);
break;
}
(void) SetImageProperty(image,keyword,options,exception);
}
if (LocaleCompare(keyword,"error") == 0)
{
- image->error.mean_error_per_pixel=InterpretLocaleValue(
+ image->error.mean_error_per_pixel=StringToDouble(
options,(char **) NULL);
break;
}
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- image->gamma=InterpretLocaleValue(options,(char **) NULL);
+ image->gamma=StringToDouble(options,(char **) NULL);
break;
}
if (LocaleCompare(keyword,"green-primary") == 0)
if (LocaleCompare(keyword,"maximum-error") == 0)
{
image->error.normalized_maximum_error=
- InterpretLocaleValue(options,(char **) NULL);
+ StringToDouble(options,(char **) NULL);
break;
}
if (LocaleCompare(keyword,"mean-error") == 0)
{
- image->error.normalized_mean_error=InterpretLocaleValue(
+ image->error.normalized_mean_error=StringToDouble(
options,(char **) NULL);
break;
}
*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=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,
+ geometry_info.rho=StringToDouble(value,
(char **) NULL);
break;
}
{
if (LocaleCompare(keyword, "bias") == 0)
{
- bias = InterpretLocaleValue(value,(char **) NULL);
+ bias = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword, "radius") == 0)
{
- radius = InterpretLocaleValue(value,(char **) NULL);
+ radius = 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;
}
if (LocaleCompare(keyword,"rotate") == 0)
{
rotate_image=RotateImage(composite_image,
- InterpretLocaleValue(value,(char **) NULL),&exception);
+ StringToDouble(value,(char **) NULL),&exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
*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;
}
{
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;
}
{
if (LocaleCompare(keyword,"opacity") == 0)
{
- opacity=InterpretLocaleValue(value,(char **) NULL);
+ opacity=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,"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;
}
{
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;
}
*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;
}
{
if (LocaleCompare(keyword,"blur") == 0)
{
- msl_info->image[n]->blur=InterpretLocaleValue(value,
+ msl_info->image[n]->blur=StringToDouble(value,
(char **) NULL);
break;
}
{
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 (LocaleCompare(keyword,"support") == 0)
{
- blur=InterpretLocaleValue(value,(char **) NULL);
+ blur=StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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);
{
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;
}
{
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;
}
{
if (LocaleCompare(keyword, "bias") == 0)
{
- bias = InterpretLocaleValue(value,(char **) NULL);
+ bias = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword, "radius") == 0)
{
- radius = InterpretLocaleValue(value,(char **) NULL);
+ radius = StringToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
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) InterpretLocaleInterval(value,100.0);
+ limit=(MagickSizeType) StringToDoubleInterval(value,100.0);
(void) SetMagickResourceLimit(AreaResource,limit);
break;
}
{
if (image == (Image *) NULL)
break;
- image->bias=InterpretLocaleInterval(value,QuantumRange);
+ image->bias=StringToDoubleInterval(value,QuantumRange);
break;
}
if (LocaleCompare(keyword,"blue-primary") == 0)
{
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);
scale[MaxTextExtent];
(void) ReadBlobString(image,scale);
- quantum_scale=InterpretLocaleValue(scale,(char **) NULL);
+ quantum_scale=StringToDouble(scale,(char **) NULL);
}
else
{
separations_mask=ReadBlobMSBShort(image);
count=ReadBlob(image,14,buffer);
buffer[14]='\0';
- height=InterpretLocaleValue((char *) buffer,(char **) NULL);
+ height=StringToDouble((char *) buffer,(char **) NULL);
count=ReadBlob(image,14,buffer);
- width=InterpretLocaleValue((char *) buffer,(char **) NULL);
+ width=StringToDouble((char *) buffer,(char **) NULL);
count=ReadBlob(image,12,buffer);
buffer[12]='\0';
image->rows=StringToUnsignedLong((char *) buffer);
assert(string != (const char *) NULL);
p=(const char *) string;
GetMagickToken(p,&p,token);
- value=InterpretLocaleValue(token,(char **) NULL);
+ value=StringToDouble(token,(char **) NULL);
if (strchr(token,'%') != (char *) NULL)
{
double
{
p=(const char *) value;
GetMagickToken(p,&p,token);
- affine.sx=InterpretLocaleValue(value,(char **) NULL);
+ affine.sx=StringToDouble(value,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.rx=InterpretLocaleValue(token,(char **) NULL);
+ affine.rx=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.ry=InterpretLocaleValue(token,(char **) NULL);
+ affine.ry=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.sy=InterpretLocaleValue(token,(char **) NULL);
+ affine.sy=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.tx=InterpretLocaleValue(token,(char **) NULL);
+ affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.ty=InterpretLocaleValue(token,(char **) NULL);
+ affine.ty=StringToDouble(token,(char **) NULL);
break;
}
break;
{
p=(const char *) value;
GetMagickToken(p,&p,token);
- affine.sx=InterpretLocaleValue(value,(char **) NULL);
+ affine.sx=StringToDouble(value,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.rx=InterpretLocaleValue(token,(char **) NULL);
+ affine.rx=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.ry=InterpretLocaleValue(token,(char **) NULL);
+ affine.ry=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.sy=InterpretLocaleValue(token,(char **) NULL);
+ affine.sy=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.tx=InterpretLocaleValue(token,(char **) NULL);
+ affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- affine.ty=InterpretLocaleValue(token,(char **) NULL);
+ affine.ty=StringToDouble(token,(char **) NULL);
break;
}
break;
p=(const char *) value;
GetMagickToken(p,&p,token);
- angle=InterpretLocaleValue(value,(char **) NULL);
+ angle=StringToDouble(value,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- x=InterpretLocaleValue(token,(char **) NULL);
+ x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- y=InterpretLocaleValue(token,(char **) NULL);
+ y=StringToDouble(token,(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))));
{
p=(const char *) value;
GetMagickToken(p,&p,token);
- svg_info->view_box.x=InterpretLocaleValue(token,(char **) NULL);
+ svg_info->view_box.x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- svg_info->view_box.y=InterpretLocaleValue(token,(char **) NULL);
+ svg_info->view_box.y=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- svg_info->view_box.width=InterpretLocaleValue(token,
+ svg_info->view_box.width=StringToDouble(token,
(char **) NULL);
if (svg_info->bounds.width == 0)
svg_info->bounds.width=svg_info->view_box.width;
GetMagickToken(p,&p,token);
if (*token == ',')
GetMagickToken(p,&p,token);
- svg_info->view_box.height=InterpretLocaleValue(token,
+ svg_info->view_box.height=StringToDouble(token,
(char **) NULL);
if (svg_info->bounds.height == 0)
svg_info->bounds.height=svg_info->view_box.height;
if (LocaleCompare("affine",keyword) == 0)
{
GetMagickToken(q,&q,token);
- affine.sx=InterpretLocaleValue(token,(char **) NULL);
+ affine.sx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.rx=InterpretLocaleValue(token,(char **) NULL);
+ affine.rx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.ry=InterpretLocaleValue(token,(char **) NULL);
+ affine.ry=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.sy=InterpretLocaleValue(token,(char **) NULL);
+ affine.sy=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.tx=InterpretLocaleValue(token,(char **) NULL);
+ affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.ty=InterpretLocaleValue(token,(char **) NULL);
+ affine.ty=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("angle",keyword) == 0)
{
GetMagickToken(q,&q,token);
- affine.rx=InterpretLocaleValue(token,(char **) NULL);
- affine.ry=InterpretLocaleValue(token,(char **) NULL);
+ affine.rx=StringToDouble(token,(char **) NULL);
+ affine.ry=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("arc",keyword) == 0)
GetMagickToken(q,&q,token);
(void) CopyMagickString(type,token,MaxTextExtent);
GetMagickToken(q,&q,token);
- svg_info.segment.x1=InterpretLocaleValue(token,(char **) NULL);
- svg_info.element.cx=InterpretLocaleValue(token,(char **) NULL);
+ svg_info.segment.x1=StringToDouble(token,(char **) NULL);
+ svg_info.element.cx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- svg_info.segment.y1=InterpretLocaleValue(token,(char **) NULL);
- svg_info.element.cy=InterpretLocaleValue(token,(char **) NULL);
+ svg_info.segment.y1=StringToDouble(token,(char **) NULL);
+ svg_info.element.cy=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- svg_info.segment.x2=InterpretLocaleValue(token,(char **) NULL);
- svg_info.element.major=InterpretLocaleValue(token,
+ svg_info.segment.x2=StringToDouble(token,(char **) NULL);
+ svg_info.element.major=StringToDouble(token,
(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- svg_info.segment.y2=InterpretLocaleValue(token,(char **) NULL);
- svg_info.element.minor=InterpretLocaleValue(token,
+ svg_info.segment.y2=StringToDouble(token,(char **) NULL);
+ svg_info.element.minor=StringToDouble(token,
(char **) NULL);
(void) FormatLocaleString(message,MaxTextExtent,
"<%sGradient id=\"%s\" x1=\"%g\" y1=\"%g\" x2=\"%g\" "
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- svg_info.element.angle=InterpretLocaleValue(token,
+ svg_info.element.angle=StringToDouble(token,
(char **) NULL);
(void) FormatLocaleString(message,MaxTextExtent,
"<%sGradient id=\"%s\" cx=\"%g\" cy=\"%g\" r=\"%g\" "
GetMagickToken(q,&q,token);
(void) CopyMagickString(name,token,MaxTextExtent);
GetMagickToken(q,&q,token);
- svg_info.bounds.x=InterpretLocaleValue(token,(char **) NULL);
+ svg_info.bounds.x=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- svg_info.bounds.y=InterpretLocaleValue(token,(char **) NULL);
+ svg_info.bounds.y=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- svg_info.bounds.width=InterpretLocaleValue(token,
+ svg_info.bounds.width=StringToDouble(token,
(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- svg_info.bounds.height=InterpretLocaleValue(token,
+ svg_info.bounds.height=StringToDouble(token,
(char **) NULL);
(void) FormatLocaleString(message,MaxTextExtent,
"<pattern id=\"%s\" x=\"%g\" y=\"%g\" width=\"%g\" "
if (LocaleCompare("scale",keyword) == 0)
{
GetMagickToken(q,&q,token);
- affine.sx=InterpretLocaleValue(token,(char **) NULL);
+ affine.sx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.sy=InterpretLocaleValue(token,(char **) NULL);
+ affine.sy=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("skewX",keyword) == 0)
if (LocaleCompare("translate",keyword) == 0)
{
GetMagickToken(q,&q,token);
- affine.tx=InterpretLocaleValue(token,(char **) NULL);
+ affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- affine.ty=InterpretLocaleValue(token,(char **) NULL);
+ affine.ty=StringToDouble(token,(char **) NULL);
break;
}
status=MagickFalse;
if (IsPoint(q) == MagickFalse)
break;
GetMagickToken(q,&q,token);
- point.x=InterpretLocaleValue(token,(char **) NULL);
+ point.x=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,token);
if (*token == ',')
GetMagickToken(q,&q,token);
- point.y=InterpretLocaleValue(token,(char **) NULL);
+ point.y=StringToDouble(token,(char **) NULL);
GetMagickToken(q,(const char **) NULL,token);
if (*token == ',')
GetMagickToken(q,&q,token);
float
rational;
- rational=InterpretLocaleValue(value,(char **) NULL);
+ rational=StringToDouble(value,(char **) NULL);
(void) TIFFSetField(tiff,exif_info[i].tag,rational);
break;
}