% December 2001 %
% %
% %
-% Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
#include "magick/log.h"
#include "magick/magick.h"
#include "magick/memory_.h"
+#include "magick/module.h"
#include "magick/option.h"
#include "magick/paint.h"
#include "magick/profile.h"
#include "magick/signature.h"
#include "magick/static.h"
#include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
#include "magick/transform.h"
#include "magick/threshold.h"
#include "magick/utility.h"
#if defined(MAGICKCORE_XML_DELEGATE)
-# if defined(__WINDOWS__)
+# if defined(MAGICKCORE_WINDOWS_SUPPORT)
# if defined(__MINGW32__)
# define _MSC_VER
# else
*/
typedef struct _MSLGroupInfo
{
- unsigned long
+ size_t
numImages; /* how many images are in this group */
} MSLGroupInfo;
ExceptionInfo
*exception;
- long
+ ssize_t
n,
number_groups;
static void MSLPushImage(MSLInfo *msl_info,Image *image)
{
- long
+ ssize_t
n;
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
int
flags;
- long
+ ssize_t
option,
j,
n,
RectangleInfo
geometry;
- register long
+ register ssize_t
i;
- unsigned long
+ size_t
height,
width;
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=atof(value);
+ draw_info->pointsize=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"rotate") == 0)
{
- angle=atof(value);
+ angle=StringToDouble(value);
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=atof(value);
+ angle=StringToDouble(value);
affine.ry=tan(DegreesToRadians(fmod((double) angle,
360.0)));
break;
}
if (LocaleCompare(keyword,"skewY") == 0)
{
- angle=atof(value);
+ angle=StringToDouble(value);
affine.rx=tan(DegreesToRadians(fmod((double) angle,
360.0)));
break;
}
if (LocaleCompare(keyword,"strokewidth") == 0)
{
- draw_info->stroke_width=atol(value);
+ draw_info->stroke_width=StringToLong(value);
break;
}
if (LocaleCompare(keyword,"style") == 0)
{
if (LocaleCompare(keyword,"weight") == 0)
{
- draw_info->weight=atol(value);
+ draw_info->weight=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,"%lux%lu%+ld%+ld",
- geometry.width,geometry.height,geometry.x,geometry.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
+ geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
- draw_info->affine.sx=current.sx*affine.sx+current.ry*affine.rx;
- draw_info->affine.rx=current.rx*affine.sx+current.sy*affine.rx;
- draw_info->affine.ry=current.sx*affine.ry+current.ry*affine.sy;
- draw_info->affine.sy=current.rx*affine.ry+current.sy*affine.sy;
- draw_info->affine.tx=current.sx*affine.tx+current.ry*affine.ty+
- current.tx;
- draw_info->affine.ty=current.rx*affine.tx+current.sy*affine.ty+
- current.ty;
+ draw_info->affine.sx=affine.sx*current.sx+affine.ry*current.rx;
+ draw_info->affine.rx=affine.rx*current.sx+affine.sy*current.rx;
+ draw_info->affine.ry=affine.sx*current.ry+affine.ry*current.sy;
+ draw_info->affine.sy=affine.rx*current.ry+affine.sy*current.sy;
+ draw_info->affine.tx=affine.sx*current.tx+affine.ry*current.ty+
+ affine.tx;
+ draw_info->affine.ty=affine.rx*current.tx+affine.sy*current.ty+
+ affine.ty;
(void) AnnotateImage(msl_info->image[n],draw_info);
draw_info=DestroyDrawInfo(draw_info);
break;
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"sigma") == 0)
{
- geometry_info.sigma=atol(value);
+ geometry_info.sigma=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=atol(value);
+ geometry.height=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"width") == 0)
{
- geometry.width=atol(value);
+ geometry.width=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword, "radius") == 0)
{
- radius = atof( value );
+ radius = StringToDouble( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"sigma") == 0)
{
- sigma = atol( value );
+ sigma = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=atol(value);
+ geometry.height=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"width") == 0)
{
- geometry.width=atol(value);
+ geometry.width=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare(keyword,"fuzz") == 0)
{
- msl_info->image[n]->fuzz=atof(value);
+ msl_info->image[n]->fuzz=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
(void) GetOneVirtualMagickPixel(msl_info->image[n],
geometry.x,geometry.y,&target,&exception);
break;
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
(void) GetOneVirtualMagickPixel(msl_info->image[n],
geometry.x,geometry.y,&target,&exception);
break;
{
if (LocaleCompare(keyword,"opacity") == 0)
{
- long
+ ssize_t
opacity,
y;
- register long
+ register ssize_t
x;
register PixelPacket
CacheView
*composite_view;
- opacity=QuantumRange-atol(value);
+ opacity=QuantumRange-StringToLong(value);
if (compose != DissolveCompositeOp)
{
(void) SetImageOpacity(composite_image,(Quantum)
if (composite_image->matte != MagickTrue)
(void) SetImageOpacity(composite_image,OpaqueOpacity);
composite_view=AcquireCacheView(composite_image);
- for (y=0; y < (long) composite_image->rows ; y++)
+ for (y=0; y < (ssize_t) composite_image->rows ; y++)
{
- q=GetCacheViewAuthenticPixels(composite_view,0,y,(long)
+ q=GetCacheViewAuthenticPixels(composite_view,0,y,(ssize_t)
composite_image->columns,1,&exception);
- for (x=0; x < (long) composite_image->columns; x++)
+ for (x=0; x < (ssize_t) composite_image->columns; x++)
{
if (q->opacity == OpaqueOpacity)
- q->opacity=RoundToQuantum(opacity);
+ q->opacity=ClampToQuantum(opacity);
q++;
}
if (SyncCacheViewAuthenticPixels(composite_view,&exception) == MagickFalse)
{
if (LocaleCompare(keyword,"rotate") == 0)
{
- rotate_image=RotateImage(composite_image,atof(value),
+ rotate_image=RotateImage(composite_image,StringToDouble(value),
&exception);
break;
}
image=msl_info->image[n];
height=composite_image->rows;
width=composite_image->columns;
- for (y=0; y < (long) image->rows; y+=height)
- for (x=0; x < (long) image->columns; x+=width)
+ for (y=0; y < (ssize_t) image->rows; y+=(ssize_t) height)
+ for (x=0; x < (ssize_t) image->columns; x+=(ssize_t) width)
{
if (rotate_image != (Image *) NULL)
(void) CompositeImage(image,compose,rotate_image,
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
(void) GetOneVirtualPixel(msl_info->image[n],geometry.x,
geometry.y,&target,&exception);
break;
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
(void) GetOneVirtualPixel(msl_info->image[n],geometry.x,
geometry.y,&target,&exception);
break;
}
image=msl_info->image[n];
(void) FormatMagickString(composite_geometry,MaxTextExtent,
- "%lux%lu%+ld%+ld",composite_image->columns,composite_image->rows,
- geometry.x,geometry.y);
+ "%.20gx%.20g%+.20g%+.20g",(double) composite_image->columns,
+ (double) composite_image->rows,(double) geometry.x,(double)
+ geometry.y);
flags=ParseGravityGeometry(image,composite_geometry,&geometry,
&exception);
if (rotate_image == (Image *) NULL)
/*
Rotate image.
*/
- geometry.x-=(long) (rotate_image->columns-
+ geometry.x-=(ssize_t) (rotate_image->columns-
composite_image->columns)/2;
- geometry.y-=(long) (rotate_image->rows-composite_image->rows)/2;
+ geometry.y-=(ssize_t) (rotate_image->rows-composite_image->rows)/2;
CompositeImageChannel(image,channel,compose,rotate_image,
geometry.x,geometry.y);
rotate_image=DestroyImage(rotate_image);
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=atol(value);
+ geometry.height=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"width") == 0)
{
- geometry.width=atol(value);
+ geometry.width=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare((const char *) tag,"cycle-colormap") == 0)
{
- long
+ ssize_t
display;
/*
{
if (LocaleCompare(keyword,"display") == 0)
{
- display=atol(value);
+ display=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=atof(value);
+ draw_info->pointsize=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"rotate") == 0)
{
- angle=atof(value);
+ angle=StringToDouble(value);
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=atof(value);
+ angle=StringToDouble(value);
affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
break;
}
if (LocaleCompare(keyword,"skewY") == 0)
{
- angle=atof(value);
+ angle=StringToDouble(value);
affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
break;
}
}
if (LocaleCompare(keyword,"strokewidth") == 0)
{
- draw_info->stroke_width=atol(value);
+ draw_info->stroke_width=StringToLong(value);
break;
}
if (LocaleCompare(keyword,"style") == 0)
{
if (LocaleCompare(keyword,"weight") == 0)
{
- draw_info->weight=atol(value);
+ draw_info->weight=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,"%lux%lu%+ld%+ld",
- geometry.width,geometry.height,geometry.x,geometry.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
+ geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
- draw_info->affine.sx=current.sx*affine.sx+current.ry*affine.rx;
- draw_info->affine.rx=current.rx*affine.sx+current.sy*affine.rx;
- draw_info->affine.ry=current.sx*affine.ry+current.ry*affine.sy;
- draw_info->affine.sy=current.rx*affine.ry+current.sy*affine.sy;
- draw_info->affine.tx=current.sx*affine.tx+current.ry*affine.ty+
- current.tx;
- draw_info->affine.ty=current.rx*affine.tx+current.sy*affine.ty+
- current.ty;
+ draw_info->affine.sx=affine.sx*current.sx+affine.ry*current.rx;
+ draw_info->affine.rx=affine.rx*current.sx+affine.sy*current.rx;
+ draw_info->affine.ry=affine.sx*current.ry+affine.ry*current.sy;
+ draw_info->affine.sy=affine.rx*current.ry+affine.sy*current.sy;
+ draw_info->affine.tx=affine.sx*current.tx+affine.ry*current.ty+
+ affine.tx;
+ draw_info->affine.ty=affine.rx*current.tx+affine.sy*current.ty+
+ affine.ty;
(void) DrawImage(msl_info->image[n],draw_info);
draw_info=DestroyDrawInfo(draw_info);
break;
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"sigma") == 0)
{
- geometry_info.sigma=atol(value);
+ geometry_info.sigma=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"height") == 0)
{
- frame_info.height=atol(value);
+ frame_info.height=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"inner") == 0)
{
- frame_info.inner_bevel=atol(value);
+ frame_info.inner_bevel=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"outer") == 0)
{
- frame_info.outer_bevel=atol(value);
+ frame_info.outer_bevel=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"width") == 0)
{
- frame_info.width=atol(value);
+ frame_info.width=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- frame_info.x=(long) frame_info.width;
- frame_info.y=(long) frame_info.height;
+ frame_info.x=(ssize_t) frame_info.width;
+ frame_info.y=(ssize_t) frame_info.height;
frame_info.width=msl_info->image[n]->columns+2*frame_info.x;
frame_info.height=msl_info->image[n]->rows+2*frame_info.y;
frame_image=FrameImage(msl_info->image[n],&frame_info,
{
if (LocaleCompare(keyword,"blue") == 0)
{
- pixel.blue=atof(value);
+ pixel.blue=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare(keyword,"green") == 0)
{
- pixel.green=atof(value);
+ pixel.green=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"red") == 0)
{
- pixel.red=atof(value);
+ pixel.red=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"height") == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%ld",
- msl_info->image[n]->rows);
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+ (double) msl_info->image[n]->rows);
(void) SetImageProperty(msl_info->attributes[n],key,value);
break;
}
{
if (LocaleCompare(keyword,"width") == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%ld",
- msl_info->image[n]->columns);
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+ (double) msl_info->image[n]->columns);
(void) SetImageProperty(msl_info->attributes[n],key,value);
break;
}
{
if (LocaleCompare(keyword,"amount") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"black") == 0)
{
- levelBlack = atof( value );
+ levelBlack = StringToDouble( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- levelGamma = atof( value );
+ levelGamma = StringToDouble( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"white") == 0)
{
- levelWhite = atof( value );
+ levelWhite = StringToDouble( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"fuzz") == 0)
{
- msl_info->image[n]->fuzz=atof(value);
+ msl_info->image[n]->fuzz=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"opacity") == 0)
{
- opacity=atof(value);
+ opacity=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
(void) GetOneVirtualMagickPixel(msl_info->image[n],
geometry.x,geometry.y,&target,&exception);
break;
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
(void) GetOneVirtualMagickPixel(msl_info->image[n],
geometry.x,geometry.y,&target,&exception);
break;
}
draw_info=CloneDrawInfo(msl_info->image_info[n],
msl_info->draw_info[n]);
- draw_info->fill.opacity=RoundToQuantum(opacity);
+ draw_info->fill.opacity=ClampToQuantum(opacity);
(void) FloodfillPaintImage(msl_info->image[n],OpacityChannel,
draw_info,&target,geometry.x,geometry.y,
paint_method == FloodfillMethod ? MagickFalse : MagickTrue);
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"blackness") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
if (LocaleCompare(keyword,"brightness") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"hue") == 0)
{
- geometry_info.xi=atof(value);
+ geometry_info.xi=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"lightness") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"saturation") == 0)
{
- geometry_info.sigma=atof(value);
+ geometry_info.sigma=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"whiteness") == 0)
{
- geometry_info.sigma=atof(value);
+ geometry_info.sigma=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare(keyword,"fuzz") == 0)
{
- msl_info->image[n]->fuzz=atof(value);
+ msl_info->image[n]->fuzz=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
if (profile != (StringInfo *) NULL)
{
(void) ProfileImage(msl_info->image[n],name,
- GetStringInfoDatum(profile),(unsigned long)
+ GetStringInfoDatum(profile),(size_t)
GetStringInfoLength(profile),MagickFalse);
profile=DestroyStringInfo(profile);
}
profile=GetImageProfile(profile_image,name);
if (profile != (StringInfo *) NULL)
(void) ProfileImage(msl_info->image[n],name,
- GetStringInfoDatum(profile),(unsigned long)
+ GetStringInfoDatum(profile),(size_t)
GetStringInfoLength(profile),MagickFalse);
name=GetNextImageProfile(profile_image);
}
{
if (LocaleCompare(keyword,"colors") == 0)
{
- quantize_info.number_colors=atol(value);
+ quantize_info.number_colors=StringToLong(value);
break;
}
if (LocaleCompare(keyword,"colorspace") == 0)
{
if (LocaleCompare(keyword,"treedepth") == 0)
{
- quantize_info.tree_depth=atol(value);
+ quantize_info.tree_depth=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=atof(value);
+ draw_info->pointsize=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"rotate") == 0)
{
- angle=atof(value);
+ angle=StringToDouble(value);
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=atof(value);
+ angle=StringToDouble(value);
affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
break;
}
if (LocaleCompare(keyword,"skewY") == 0)
{
- angle=atof(value);
+ angle=StringToDouble(value);
affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
break;
}
}
if (LocaleCompare(keyword,"strokewidth") == 0)
{
- draw_info->stroke_width=atol(value);
+ draw_info->stroke_width=StringToLong(value);
break;
}
if (LocaleCompare(keyword,"style") == 0)
{
if (LocaleCompare(keyword,"weight") == 0)
{
- draw_info->weight=atol(value);
+ draw_info->weight=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,"%lux%lu%+ld%+ld",
- geometry.width,geometry.height,geometry.x,geometry.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
+ geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
- draw_info->affine.sx=current.sx*affine.sx+current.ry*affine.rx;
- draw_info->affine.rx=current.rx*affine.sx+current.sy*affine.rx;
- draw_info->affine.ry=current.sx*affine.ry+current.ry*affine.sy;
- draw_info->affine.sy=current.rx*affine.ry+current.sy*affine.sy;
- draw_info->affine.tx=current.sx*affine.tx+current.ry*affine.ty+
- current.tx;
- draw_info->affine.ty=current.rx*affine.tx+current.sy*affine.ty+
- current.ty;
+ draw_info->affine.sx=affine.sx*current.sx+affine.ry*current.rx;
+ draw_info->affine.rx=affine.rx*current.sx+affine.sy*current.rx;
+ draw_info->affine.ry=affine.sx*current.ry+affine.ry*current.sy;
+ draw_info->affine.sy=affine.rx*current.ry+affine.sy*current.sy;
+ draw_info->affine.tx=affine.sx*current.tx+affine.ry*current.ty+
+ affine.tx;
+ draw_info->affine.ty=affine.rx*current.tx+affine.sy*current.ty+
+ affine.ty;
status=GetTypeMetrics(msl_info->attributes[n],draw_info,&metrics);
if (status != MagickFalse)
{
*image;
image=msl_info->attributes[n];
- FormatImageProperty(image,"msl:font-metrics.pixels_per_em.x","%g",
- metrics.pixels_per_em.x);
- FormatImageProperty(image,"msl:font-metrics.pixels_per_em.y","%g",
- metrics.pixels_per_em.y);
+ FormatImageProperty(image,"msl:font-metrics.pixels_per_em.x",
+ "%g",metrics.pixels_per_em.x);
+ FormatImageProperty(image,"msl:font-metrics.pixels_per_em.y",
+ "%g",metrics.pixels_per_em.y);
FormatImageProperty(image,"msl:font-metrics.ascent","%g",
metrics.ascent);
FormatImageProperty(image,"msl:font-metrics.descent","%g",
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=atol(value);
+ geometry.height=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"width") == 0)
{
- geometry.width=atol(value);
+ geometry.width=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"height") == 0)
{
- height = atol( value );
+ height = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"width") == 0)
{
- width = atol( value );
+ width = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"x") == 0)
{
- x = atol( value );
+ x = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"y") == 0)
{
- y = atol( value );
+ y = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"blur") == 0)
{
- msl_info->image[n]->blur=atof(value);
+ msl_info->image[n]->blur=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"geometry") == 0)
{
- long
+ ssize_t
flags;
flags=ParseGeometry(value,&geometry_info);
{
if (LocaleCompare(keyword,"x-resolution") == 0)
{
- x_resolution=atof(value);
+ x_resolution=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"y-resolution") == 0)
{
- y_resolution=atof(value);
+ y_resolution=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
factor=1.0;
if (msl_info->image[n]->units == PixelsPerCentimeterResolution)
factor=2.54;
- width=(unsigned long) (x_resolution*msl_info->image[n]->columns/
+ width=(size_t) (x_resolution*msl_info->image[n]->columns/
(factor*(msl_info->image[n]->x_resolution == 0.0 ? DefaultResolution :
msl_info->image[n]->x_resolution))+0.5);
- height=(unsigned long) (y_resolution*msl_info->image[n]->rows/
+ height=(size_t) (y_resolution*msl_info->image[n]->rows/
(factor*(msl_info->image[n]->y_resolution == 0.0 ? DefaultResolution :
msl_info->image[n]->y_resolution))+0.5);
resample_image=ResizeImage(msl_info->image[n],width,height,
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=(unsigned long) atol(value);
+ geometry.height=StringToUnsignedLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"support") == 0)
{
- blur=atof(value);
+ blur=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"width") == 0)
{
- geometry.width=atol(value);
+ geometry.width=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry.x=atol(value);
+ geometry.x=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry.y=atol(value);
+ geometry.y=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- x = atol( value );
+ x = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"y") == 0)
{
- y = atol( value );
+ y = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- degrees = atof( value );
+ degrees = StringToDouble( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=(unsigned long) atol(value);
+ geometry.height=StringToUnsignedLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"width") == 0)
{
- geometry.width=atol(value);
+ geometry.width=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=(unsigned long) atol(value);
+ geometry.height=StringToUnsignedLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"width") == 0)
{
- geometry.width=atol(value);
+ geometry.width=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"cluster-threshold") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
if (LocaleCompare(keyword,"colorspace") == 0)
{
if (LocaleCompare(keyword,"smoothing-threshold") == 0)
{
- geometry_info.sigma=atof(value);
+ geometry_info.sigma=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare(keyword,"colorspace") == 0)
{
- long
+ ssize_t
colorspace;
colorspace=(ColorspaceType) ParseMagickOption(
{
if (LocaleCompare(keyword, "opacity") == 0)
{
- long opac = OpaqueOpacity,
- len = (long) strlen( value );
+ ssize_t opac = OpaqueOpacity,
+ len = (ssize_t) strlen( value );
if (value[len-1] == '%') {
char tmp[100];
(void) CopyMagickString(tmp,value,len);
- opac = atol( tmp );
+ opac = StringToLong( tmp );
opac = (int)(QuantumRange * ((float)opac/100));
} else
- opac = atol( value );
+ opac = StringToLong( value );
(void) SetImageOpacity( msl_info->image[n], (Quantum) opac );
break;
}
if (image_option != (const char *) NULL)
flags=ParseAbsoluteGeometry(image_option,&geometry);
flags=ParseAbsoluteGeometry(value,&geometry);
- (void) FormatMagickString(page,MaxTextExtent,"%lux%lu",
- geometry.width,geometry.height);
+ (void) FormatMagickString(page,MaxTextExtent,"%.20gx%.20g",
+ (double) geometry.width,(double) geometry.height);
if (((flags & XValue) != 0) || ((flags & YValue) != 0))
- (void) FormatMagickString(page,MaxTextExtent,"%lux%lu%+ld%+ld",
- geometry.width,geometry.height,geometry.x,geometry.y);
+ (void) FormatMagickString(page,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,
+ (double) geometry.height,(double) geometry.x,(double)
+ geometry.y);
(void) SetImageOption(msl_info->image_info[n],keyword,page);
msl_info->image_info[n]->page=GetPageGeometry(page);
break;
{
if (LocaleCompare(keyword,"azimuth") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"elevation") == 0)
{
- geometry_info.sigma=atof(value);
+ geometry_info.sigma=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"opacity") == 0)
{
- geometry_info.rho=atol(value);
+ geometry_info.rho=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"sigma") == 0)
{
- geometry_info.sigma=atol(value);
+ geometry_info.sigma=StringToLong(value);
break;
}
break;
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry_info.xi=atof(value);
+ geometry_info.xi=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry_info.psi=atol(value);
+ geometry_info.psi=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
shadow_image=ShadowImage(msl_info->image[n],geometry_info.rho,
- geometry_info.sigma,(long) (geometry_info.xi+0.5),(long)
- (geometry_info.psi+0.5),&msl_info->image[n]->exception);
+ geometry_info.sigma,(ssize_t) ceil(geometry_info.xi-0.5),(ssize_t)
+ ceil(geometry_info.psi-0.5),&msl_info->image[n]->exception);
if (shadow_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
{
if (LocaleCompare(keyword, "radius") == 0)
{
- radius = atof( value );
+ radius = StringToDouble( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"sigma") == 0)
{
- sigma = atol( value );
+ sigma = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"height") == 0)
{
- height = atol( value );
+ height = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"width") == 0)
{
- width = atol( value );
+ width = StringToLong( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"y") == 0)
{
- geometry_info.sigma=atol(value);
+ geometry_info.sigma=StringToLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"threshold") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
*q,
*swap;
- long
+ ssize_t
index,
swap_index;
if (LocaleCompare(keyword,"indexes") == 0)
{
flags=ParseGeometry(value,&geometry_info);
- index=(long) geometry_info.rho;
+ index=(ssize_t) geometry_info.rho;
if ((flags & SigmaValue) == 0)
- swap_index=(long) geometry_info.sigma;
+ swap_index=(ssize_t) geometry_info.sigma;
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- geometry_info.rho=atof(value);
+ geometry_info.rho=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"threshold") == 0)
{
- threshold = atof( value );
+ threshold = StringToDouble( value );
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
*/
{
BilevelImageChannel(msl_info->image[n],
- (ChannelType) ((long) (AllChannels &~ (long) OpacityChannel)),
+ (ChannelType) ((ssize_t) (AllChannels &~ (ssize_t) OpacityChannel)),
threshold);
break;
}
static void MSLEndElement(void *context,const xmlChar *tag)
{
- long
+ ssize_t
n;
MSLInfo
{
if (msl_info->group_info[msl_info->number_groups-1].numImages > 0 )
{
- long i = (long)
+ ssize_t i = (ssize_t)
(msl_info->group_info[msl_info->number_groups-1].numImages);
while ( i-- )
{
register char
*p;
- register long
+ register ssize_t
i;
/*
static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,Image **image,
ExceptionInfo *exception)
{
- xmlSAXHandler
- SAXModules =
- {
- MSLInternalSubset,
- MSLIsStandalone,
- MSLHasInternalSubset,
- MSLHasExternalSubset,
- MSLResolveEntity,
- MSLGetEntity,
- MSLEntityDeclaration,
- MSLNotationDeclaration,
- MSLAttributeDeclaration,
- MSLElementDeclaration,
- MSLUnparsedEntityDeclaration,
- MSLSetDocumentLocator,
- MSLStartDocument,
- MSLEndDocument,
- MSLStartElement,
- MSLEndElement,
- MSLReference,
- MSLCharacters,
- MSLIgnorableWhitespace,
- MSLProcessingInstructions,
- MSLComment,
- MSLWarning,
- MSLError,
- MSLError,
- MSLGetParameterEntity,
- MSLCDataBlock,
- MSLExternalSubset
- };
-
char
message[MaxTextExtent];
int
status;
- long
+ ssize_t
n;
MSLInfo
msl_info;
+ xmlSAXHandler
+ sax_modules;
+
xmlSAXHandlerPtr
- SAXHandler;
+ sax_handler;
/*
Open image file.
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickSignature);
if (image_info->debug != MagickFalse)
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image_info->filename);
+ (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
+ image_info->filename);
assert(image != (Image **) NULL);
msl_image=AcquireImage(image_info);
status=OpenBlob(image_info,msl_image,ReadBinaryBlobMode,exception);
if (*image != (Image *) NULL)
MSLPushImage(&msl_info,*image);
(void) xmlSubstituteEntitiesDefault(1);
- SAXHandler=(&SAXModules);
- msl_info.parser=xmlCreatePushParserCtxt(SAXHandler,&msl_info,(char *) NULL,0,
+ (void) ResetMagickMemory(&sax_modules,0,sizeof(sax_modules));
+ sax_modules.internalSubset=MSLInternalSubset;
+ sax_modules.isStandalone=MSLIsStandalone;
+ sax_modules.hasInternalSubset=MSLHasInternalSubset;
+ sax_modules.hasExternalSubset=MSLHasExternalSubset;
+ sax_modules.resolveEntity=MSLResolveEntity;
+ sax_modules.getEntity=MSLGetEntity;
+ sax_modules.entityDecl=MSLEntityDeclaration;
+ sax_modules.notationDecl=MSLNotationDeclaration;
+ sax_modules.attributeDecl=MSLAttributeDeclaration;
+ sax_modules.elementDecl=MSLElementDeclaration;
+ sax_modules.unparsedEntityDecl=MSLUnparsedEntityDeclaration;
+ sax_modules.setDocumentLocator=MSLSetDocumentLocator;
+ sax_modules.startDocument=MSLStartDocument;
+ sax_modules.endDocument=MSLEndDocument;
+ sax_modules.startElement=MSLStartElement;
+ sax_modules.endElement=MSLEndElement;
+ sax_modules.reference=MSLReference;
+ sax_modules.characters=MSLCharacters;
+ sax_modules.ignorableWhitespace=MSLIgnorableWhitespace;
+ sax_modules.processingInstruction=MSLProcessingInstructions;
+ sax_modules.comment=MSLComment;
+ sax_modules.warning=MSLWarning;
+ sax_modules.error=MSLError;
+ sax_modules.fatalError=MSLError;
+ sax_modules.getParameterEntity=MSLGetParameterEntity;
+ sax_modules.cdataBlock=MSLCDataBlock;
+ sax_modules.externalSubset=MSLExternalSubset;
+ sax_handler=(&sax_modules);
+ msl_info.parser=xmlCreatePushParserCtxt(sax_handler,&msl_info,(char *) NULL,0,
msl_image->filename);
while (ReadBlobString(msl_image,message) != (char *) NULL)
{
- n=(long) strlen(message);
+ n=(ssize_t) strlen(message);
if (n == 0)
continue;
status=xmlParseChunk(msl_info.parser,message,(int) n,MagickFalse);
msl_info.group_info);
if (*image == (Image *) NULL)
*image=(*msl_info.image);
- return((MagickBooleanType) ((*msl_info.image)->exception.severity == UndefinedException));
+ if ((*msl_info.image)->exception.severity != UndefinedException)
+ return(MagickFalse);
+ return(MagickTrue);
}
static Image *ReadMSLImage(const ImageInfo *image_info,ExceptionInfo *exception)
%
% The format of the RegisterMSLImage method is:
%
-% unsigned long RegisterMSLImage(void)
+% size_t RegisterMSLImage(void)
%
*/
-ModuleExport unsigned long RegisterMSLImage(void)
+ModuleExport size_t RegisterMSLImage(void)
{
MagickInfo
*entry;
return(MagickImageCoderSignature);
}
\f
+#if defined(MAGICKCORE_XML_DELEGATE)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
int
flags;
- long
+ ssize_t
n;
assert(msl_info != (MSLInfo *) NULL);
{
if (LocaleCompare(keyword,"adjoin") == 0)
{
- long
+ ssize_t
adjoin;
adjoin=ParseMagickOption(MagickBooleanOptions,MagickFalse,value);
}
if (LocaleCompare(keyword,"alpha") == 0)
{
- long
+ ssize_t
alpha;
alpha=ParseMagickOption(MagickAlphaOptions,MagickFalse,value);
}
if (LocaleCompare(keyword,"antialias") == 0)
{
- long
+ ssize_t
antialias;
antialias=ParseMagickOption(MagickBooleanOptions,MagickFalse,value);
limit=MagickResourceInfinity;
if (LocaleCompare(value,"unlimited") != 0)
- limit=(MagickSizeType) StringToDouble(value,100.0);
+ limit=(MagickSizeType) SiPrefixToDouble(value,100.0);
(void) SetMagickResourceLimit(AreaResource,limit);
break;
}
{
if (image == (Image *) NULL)
break;
- image->bias=StringToDouble(value,QuantumRange);
+ image->bias=SiPrefixToDouble(value,QuantumRange);
break;
}
if (LocaleCompare(keyword,"blue-primary") == 0)
{
if (LocaleCompare(keyword,"gravity") == 0)
{
- long
+ ssize_t
gravity;
gravity=ParseMagickOption(MagickGravityOptions,MagickFalse,value);
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- image_info->pointsize=atof(value);
- draw_info->pointsize=atof(value);
+ image_info->pointsize=StringToDouble(value);
+ draw_info->pointsize=StringToDouble(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"quality") == 0)
{
- image_info->quality=atol(value);
+ image_info->quality=StringToLong(value);
if (image == (Image *) NULL)
break;
- image->quality=atol(value);
+ image->quality=StringToLong(value);
break;
}
break;
}
return(MagickTrue);
}
+#endif
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%