cin.film.prefix=0UL;
value=GetCINProperty(image_info,image,"cin:film.prefix");
if (value != (const char *) NULL)
- cin.film.prefix=(unsigned long) StringToLong(value);
+ cin.film.prefix=StringToUnsignedLong(value);
offset+=WriteBlobLong(image,cin.film.prefix);
cin.film.count=0UL;
value=GetCINProperty(image_info,image,"cin:film.count");
if (value != (const char *) NULL)
- cin.film.count=(unsigned long) StringToLong(value);
+ cin.film.count=StringToUnsignedLong(value);
offset+=WriteBlobLong(image,cin.film.count);
value=GetCINProperty(image_info,image,"cin:film.format");
if (value != (const char *) NULL)
cin.film.frame_position=0UL;
value=GetCINProperty(image_info,image,"cin:film.frame_position");
if (value != (const char *) NULL)
- cin.film.frame_position=(unsigned long) StringToLong(value);
+ cin.film.frame_position=StringToUnsignedLong(value);
offset+=WriteBlobLong(image,cin.film.frame_position);
cin.film.frame_rate=0.0f;
value=GetCINProperty(image_info,image,"cin:film.frame_rate");
/*
Number of frames.
*/
- number_scenes=(unsigned long) StringToLong((char *) data);
+ number_scenes=StringToUnsignedLong((char *) data);
break;
}
case 0x0010:
/*
Visible pixel range: width.
*/
- window_width=(unsigned long) StringToLong((char *) data);
+ window_width=StringToUnsignedLong((char *) data);
break;
}
case 0x1200:
dpx.orientation.x_offset=0U;
value=GetDPXProperty(image_info,image,"dpx:orientation.x_offset");
if (value != (const char *) NULL)
- dpx.orientation.x_offset=(unsigned int) StringToLong(value);
+ dpx.orientation.x_offset=(unsigned int) StringToUnsignedLong(value);
offset+=WriteBlobLong(image,dpx.orientation.x_offset);
dpx.orientation.y_offset=0U;
value=GetDPXProperty(image_info,image,"dpx:orientation.y_offset");
if (value != (const char *) NULL)
- dpx.orientation.y_offset=(unsigned int) StringToLong(value);
+ dpx.orientation.y_offset=(unsigned int) StringToUnsignedLong(value);
offset+=WriteBlobLong(image,dpx.orientation.y_offset);
dpx.orientation.x_center=0.0f;
value=GetDPXProperty(image_info,image,"dpx:orientation.x_center");
dpx.orientation.x_size=0U;
value=GetDPXProperty(image_info,image,"dpx:orientation.x_size");
if (value != (const char *) NULL)
- dpx.orientation.x_size=(unsigned int) StringToLong(value);
+ dpx.orientation.x_size=(unsigned int) StringToUnsignedLong(value);
offset+=WriteBlobLong(image,dpx.orientation.x_size);
dpx.orientation.y_size=0U;
value=GetDPXProperty(image_info,image,"dpx:orientation.y_size");
if (value != (const char *) NULL)
- dpx.orientation.y_size=(unsigned int) StringToLong(value);
+ dpx.orientation.y_size=(unsigned int) StringToUnsignedLong(value);
offset+=WriteBlobLong(image,dpx.orientation.y_size);
value=GetDPXProperty(image_info,image,"dpx:orientation.filename");
if (value != (const char *) NULL)
dpx.film.frame_position=0U;
value=GetDPXProperty(image_info,image,"dpx:film.frame_position");
if (value != (const char *) NULL)
- dpx.film.frame_position=(unsigned int) StringToLong(value);
+ dpx.film.frame_position=(unsigned int) StringToUnsignedLong(value);
offset+=WriteBlobLong(image,dpx.film.frame_position);
dpx.film.sequence_extent=0U;
value=GetDPXProperty(image_info,image,"dpx:film.sequence_extent");
if (value != (const char *) NULL)
- dpx.film.sequence_extent=(unsigned int) StringToLong(value);
+ dpx.film.sequence_extent=(unsigned int) StringToUnsignedLong(value);
offset+=WriteBlobLong(image,dpx.film.sequence_extent);
dpx.film.held_count=0U;
value=GetDPXProperty(image_info,image,"dpx:film.held_count");
if (value != (const char *) NULL)
- dpx.film.held_count=(unsigned int) StringToLong(value);
+ dpx.film.held_count=(unsigned int) StringToUnsignedLong(value);
offset+=WriteBlobLong(image,dpx.film.held_count);
dpx.film.frame_rate=0.0f;
value=GetDPXProperty(image_info,image,"dpx:film.frame_rate");
image=AcquireImage(image_info);
level=0;
if (*image_info->filename != '\0')
- level=(unsigned long) StringToLong(image_info->filename);
+ level=StringToUnsignedLong(image_info->filename);
if (level < 2)
level=8;
status=MagickTrue;
dataset = (unsigned char) StringToLong(newstr);
break;
case 1:
- recnum = (unsigned int) StringToLong(newstr);
+ recnum = (unsigned int) StringToUnsignedLong(newstr);
break;
case 2:
name=(char *) AcquireQuantumMemory(strlen(newstr)+MaxTextExtent,
dataset = (unsigned char) StringToLong(newstr);
break;
case 1:
- recnum=(unsigned int) StringToLong(newstr);
+ recnum=(unsigned int) StringToUnsignedLong(newstr);
break;
case 2:
name=(char *) AcquireQuantumMemory(strlen(newstr)+MaxTextExtent,
}
if (LocaleCompare(keyword,"colors") == 0)
{
- colors=(unsigned long) StringToLong(options);
+ colors=StringToUnsignedLong(options);
break;
}
if (LocaleCompare(keyword,"colorspace") == 0)
}
if (LocaleCompare(keyword,"columns") == 0)
{
- image->columns=(unsigned long) StringToLong(options);
+ image->columns=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
{
if (LocaleCompare(keyword,"delay") == 0)
{
- image->delay=(unsigned long) StringToLong(options);
+ image->delay=StringToUnsignedLong(options);
break;
}
if (LocaleCompare(keyword,"depth") == 0)
{
- image->depth=(unsigned long) StringToLong(options);
+ image->depth=StringToUnsignedLong(options);
break;
}
if (LocaleCompare(keyword,"dispose") == 0)
}
if (LocaleCompare(keyword,"iterations") == 0)
{
- image->iterations=(unsigned long) StringToLong(options);
+ image->iterations=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
{
if (LocaleCompare(keyword,"quality") == 0)
{
- image->quality=(unsigned long) StringToLong(options);
+ image->quality=StringToUnsignedLong(options);
break;
}
if ((LocaleCompare(keyword,"quantum-format") == 0) ||
}
if (LocaleCompare(keyword,"rows") == 0)
{
- image->rows=(unsigned long) StringToLong(options);
+ image->rows=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
{
if (LocaleCompare(keyword,"scene") == 0)
{
- image->scene=(unsigned long) StringToLong(options);
+ image->scene=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
}
if (LocaleCompare(keyword,"colors") == 0)
{
- image->colors=(unsigned long) StringToLong(options);
+ image->colors=StringToUnsignedLong(options);
break;
}
if (LocaleCompare(keyword,"colorspace") == 0)
}
if (LocaleCompare(keyword,"columns") == 0)
{
- image->columns=(unsigned long) StringToLong(options);
+ image->columns=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
{
if (LocaleCompare(keyword,"delay") == 0)
{
- image->delay=(unsigned long) StringToLong(options);
+ image->delay=StringToUnsignedLong(options);
break;
}
if (LocaleCompare(keyword,"depth") == 0)
{
- image->depth=(unsigned long) StringToLong(options);
+ image->depth=StringToUnsignedLong(options);
break;
}
if (LocaleCompare(keyword,"dispose") == 0)
}
if (LocaleCompare(keyword,"iterations") == 0)
{
- image->iterations=(unsigned long) StringToLong(options);
+ image->iterations=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
{
if (LocaleCompare(keyword,"quality") == 0)
{
- image->quality=(unsigned long) StringToLong(options);
+ image->quality=StringToUnsignedLong(options);
break;
}
if (LocaleCompare(keyword,"quantum-depth") == 0)
{
- quantum_depth=(unsigned long) StringToLong(options);
+ quantum_depth=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
}
if (LocaleCompare(keyword,"rows") == 0)
{
- image->rows=(unsigned long) StringToLong(options);
+ image->rows=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
{
if (LocaleCompare(keyword,"scene") == 0)
{
- image->scene=(unsigned long) StringToLong(options);
+ image->scene=StringToUnsignedLong(options);
break;
}
(void) SetImageProperty(image,keyword,options);
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=(unsigned long) StringToLong(value);
+ geometry.height=StringToUnsignedLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=(unsigned long) StringToLong(value);
+ geometry.height=StringToUnsignedLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"height") == 0)
{
- geometry.height=(unsigned long) StringToLong(value);
+ geometry.height=StringToUnsignedLong(value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
Assign a value to the specified keyword.
*/
if (LocaleCompare(keyword,"depth") == 0)
- packet_size=(unsigned long) StringToLong(value);
+ packet_size=StringToUnsignedLong(value);
if (LocaleCompare(keyword,"height") == 0)
- image->rows=(unsigned long) StringToLong(value);
+ image->rows=StringToUnsignedLong(value);
if (LocaleCompare(keyword,"maxval") == 0)
- max_value=(unsigned long) StringToLong(value);
+ max_value=StringToUnsignedLong(value);
if (LocaleCompare(keyword,"TUPLTYPE") == 0)
{
if (LocaleCompare(value,"BLACKANDWHITE") == 0)
}
}
if (LocaleCompare(keyword,"width") == 0)
- image->columns=(unsigned long) StringToLong(value);
+ image->columns=StringToUnsignedLong(value);
}
}
if ((image->columns == 0) || (image->rows == 0))
AC_FUNC_STRTOD
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([_exit atexit clock directio execvp floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol symlink sysconf sigemptyset sigaction strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep vsprintf vsnprintf waitpid _wfopen _wstat])
+AC_CHECK_FUNCS([_exit atexit clock directio execvp floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol strtoul symlink sysconf sigemptyset sigaction strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep vsprintf vsnprintf waitpid _wfopen _wstat])
#
# Check for clock_gettime().
quality);
if (*quality == '\0')
return(MagickTrue);
- image->quality=(unsigned long) StringToLong(quality);
+ image->quality=StringToUnsignedLong(quality);
image_info->interlace=status != MagickFalse ? NoInterlace :
PlaneInterlace;
}
break;
if (entry != 5)
{
- line_width=(unsigned int) StringToLong(WidthsMenu[entry]);
+ line_width=(unsigned int) StringToUnsignedLong(WidthsMenu[entry]);
break;
}
(void) XDialogWidget(display,windows,"Ok","Enter line width:",
width);
if (*width == '\0')
break;
- line_width=(unsigned int) StringToLong(width);
+ line_width=(unsigned int) StringToUnsignedLong(width);
break;
}
case DrawUndoCommand:
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- quantize_info.number_colors=(unsigned long) StringToLong(colors);
+ quantize_info.number_colors=StringToUnsignedLong(colors);
quantize_info.dither=status != 0 ? MagickTrue : MagickFalse;
(void) QuantizeImage(&quantize_info,*image);
XSetCursorState(display,windows,MagickFalse);
"Pause how many 1/100ths of a second between images:",delay);
if (*delay == '\0')
break;
- resource_info->delay=(unsigned long) StringToLong(delay);
+ resource_info->delay=StringToUnsignedLong(delay);
XClientMessage(display,windows->image.id,windows->im_protocols,
windows->im_next_image,CurrentTime);
break;
quality);
if (*quality == '\0')
return(MagickTrue);
- image->quality=(unsigned long) StringToLong(quality);
+ image->quality=StringToUnsignedLong(quality);
image_info->interlace=status != 0 ? NoInterlace : PlaneInterlace;
}
if ((LocaleCompare(image_info->magick,"EPS") == 0) ||
if (LocaleCompare("font-weight",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->weight=(unsigned long) StringToLong(token);
+ graphic_context[n]->weight=StringToUnsignedLong(token);
if (LocaleCompare(token,"all") == 0)
graphic_context[n]->weight=0;
if (LocaleCompare(token,"bold") == 0)
if (LocaleCompare("stroke-miterlimit",keyword) == 0)
{
GetMagickToken(q,&q,token);
- graphic_context[n]->miterlimit=(unsigned long) StringToLong(token);
+ graphic_context[n]->miterlimit=StringToUnsignedLong(token);
break;
}
if (LocaleCompare("stroke-opacity",keyword) == 0)
last;
(void) CloneString(&image_info->scenes,subimage);
- image_info->scene=(unsigned long) StringToLong(image_info->scenes);
+ image_info->scene=StringToUnsignedLong(image_info->scenes);
image_info->number_scenes=image_info->scene;
p=image_info->scenes;
for (q=(char *) image_info->scenes; *q != '\0'; p++)
(void) QueryColorDatabase(option,&image->border_color,&image->exception);
option=GetImageOption(image_info,"colors");
if (option != (const char *) NULL)
- image->colors=(unsigned long) StringToLong(option);
+ image->colors=StringToUnsignedLong(option);
option=GetImageOption(image_info,"compose");
if (option != (const char *) NULL)
image->compose=(CompositeOperator) ParseMagickOption(MagickComposeOptions,
}
option=GetImageOption(image_info,"depth");
if (option != (const char *) NULL)
- image->depth=(unsigned long) StringToLong(option);
+ image->depth=StringToUnsignedLong(option);
option=GetImageOption(image_info,"dispose");
if (option != (const char *) NULL)
image->dispose=(DisposeType) ParseMagickOption(MagickDisposeOptions,
MagickInterpolateOptions,MagickFalse,option);
option=GetImageOption(image_info,"loop");
if (option != (const char *) NULL)
- image->iterations=(unsigned long) StringToLong(option);
+ image->iterations=StringToUnsignedLong(option);
option=GetImageOption(image_info,"mattecolor");
if (option != (const char *) NULL)
(void) QueryColorDatabase(option,&image->matte_color,&image->exception);
MagickOrientationOptions,MagickFalse,option);
option=GetImageOption(image_info,"quality");
if (option != (const char *) NULL)
- image->quality=(unsigned long) StringToLong(option);
+ image->quality=StringToUnsignedLong(option);
option=GetImageOption(image_info,"page");
if (option != (const char *) NULL)
{
image->quality=image_info->quality;
option=GetImageOption(image_info,"scene");
if (option != (const char *) NULL)
- image->scene=(unsigned long) StringToLong(option);
+ image->scene=StringToUnsignedLong(option);
option=GetImageOption(image_info,"taint");
if (option != (const char *) NULL)
image->taint=(MagickBooleanType) ParseMagickOption(MagickBooleanOptions,
log_info->generations=(~0UL);
break;
}
- log_info->generations=(unsigned long) StringToLong(token);
+ log_info->generations=StringToUnsignedLong(token);
break;
}
break;
log_info->limit=(~0UL);
break;
}
- log_info->limit=(unsigned long) StringToLong(token);
+ log_info->limit=StringToUnsignedLong(token);
break;
}
break;
}
if (LocaleCompare(property,"depth") == 0)
{
- image->depth=(unsigned long) StringToLong(value);
+ image->depth=StringToUnsignedLong(value);
break;
}
if (LocaleCompare(property,"dispose") == 0)
{
if (LocaleCompare(property,"loop") == 0)
{
- image->iterations=(unsigned long) StringToLong(value);
+ image->iterations=StringToUnsignedLong(value);
break;
}
status=AddValueToSplayTree((SplayTreeInfo *) image->properties,
limit=GetPolicyValue("thread");
if (limit != (char *) NULL)
{
- SetOpenMPMaximumThreads((unsigned long) StringToLong(limit));
+ SetOpenMPMaximumThreads(StringToUnsignedLong(limit));
(void) SetMagickResourceLimit(ThreadResource,StringToSizeType(limit,
100.0));
limit=DestroyString(limit);
/*
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.
obtain a copy of the License at
-
+
http://www.imagemagick.org/script/license.php
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
return(strtol(value,(char **) NULL,10));
}
+static inline unsigned long StringToUnsignedLong(const char *value)
+{
+ return(strtoul(value,(char **) NULL,10));
+}
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
map = DestroyThresholdMap(map);
return(map);
}
- map->width = (unsigned long) StringToLong(attr);
+ map->width = StringToUnsignedLong(attr);
if ( map->width == 0 ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
"XmlInvalidAttribute", "<levels width>, map \"%s\"", map_id);
map = DestroyThresholdMap(map);
return(map);
}
- map->height = (unsigned long) StringToLong(attr);
+ map->height = StringToUnsignedLong(attr);
if ( map->height == 0 ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
"XmlInvalidAttribute", "<levels height>, map \"%s\"", map_id);
{
if (LocaleCompare((char *) keyword,"face") == 0)
{
- type_info->face=(unsigned long) StringToLong(token);
+ type_info->face=StringToUnsignedLong(token);
break;
}
if (LocaleCompare((char *) keyword,"family") == 0)
{
if (LocaleCompare((char *) keyword,"weight") == 0)
{
- type_info->weight=(unsigned long) StringToLong(token);
+ type_info->weight=StringToUnsignedLong(token);
if (LocaleCompare(token,"bold") == 0)
type_info->weight=700;
if (LocaleCompare(token,"normal") == 0)
"borderColor",BorderColor);
resource_value=XGetResourceClass(database,client_name,"borderWidth",
(char *) "2");
- resource_info->border_width=(unsigned int) StringToLong(resource_value);
+ resource_info->border_width=(unsigned int) StringToUnsignedLong(resource_value);
resource_value=XGetResourceClass(database,client_name,"colormap",
(char *) "shared");
resource_info->colormap=UndefinedColormap;
(char *) "False");
resource_info->confirm_edit=IsMagickTrue(resource_value);
resource_value=XGetResourceClass(database,client_name,"delay",(char *) "1");
- resource_info->delay=(unsigned int) StringToLong(resource_value);
+ resource_info->delay=(unsigned int) StringToUnsignedLong(resource_value);
resource_info->display_gamma=XGetResourceClass(database,client_name,
"displayGamma",(char *) "2.2");
resource_value=XGetResourceClass(database,client_name,"displayWarnings",
resource_info->immutable=IsMagickTrue(resource_value);
resource_value=XGetResourceClass(database,client_name,"magnify",
(char *) "3");
- resource_info->magnify=(unsigned int) StringToLong(resource_value);
+ resource_info->magnify=(unsigned int) StringToUnsignedLong(resource_value);
resource_info->map_type=XGetResourceClass(database,client_name,"map",
(char *) NULL);
resource_info->matte_color=XGetResourceInstance(database,client_name,
resource_info->pen_colors[10]=XGetResourceClass(database,client_name,"pen0",
(char *) "gray");
resource_value=XGetResourceClass(database,client_name,"pause",(char *) "0");
- resource_info->pause=(unsigned int) StringToLong(resource_value);
+ resource_info->pause=(unsigned int) StringToUnsignedLong(resource_value);
resource_value=XGetResourceClass(database,client_name,"quantum",(char *) "1");
resource_info->quantum=StringToLong(resource_value);
resource_info->text_font=XGetResourceClass(database,client_name,(char *)
(char *) NULL);
resource_value=XGetResourceClass(database,client_name,"undoCache",
(char *) "16");
- resource_info->undo_cache=(unsigned int) StringToLong(resource_value);
+ resource_info->undo_cache=(unsigned int) StringToUnsignedLong(resource_value);
resource_value=XGetResourceClass(database,client_name,"update",
(char *) "False");
resource_info->update=IsMagickTrue(resource_value);
{
if (LocaleCompare("bench",option+1) == 0)
{
- iterations=(unsigned long) StringToLong(argv[++i]);
+ iterations=StringToUnsignedLong(argv[++i]);
break;
}
ThrowValidateException(OptionError,"UnrecognizedOption",option)
i++;
if ((i == (long) argc) || (IsGeometry(argv[i]) == MagickFalse))
ThrowAnimateException(OptionError,"MissingArgument",option);
- resource_info.border_width=(unsigned int) StringToLong(argv[i]);
+ resource_info.border_width=(unsigned int)
+ StringToUnsignedLong(argv[i]);
break;
}
ThrowAnimateException(OptionError,"UnrecognizedOption",option);
ThrowAnimateException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowAnimateInvalidArgumentException(option,argv[i]);
- quantize_info->number_colors=(unsigned long) StringToLong(argv[i]);
+ quantize_info->number_colors=StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("colorspace",option+1) == 0)
ThrowAnimateException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowAnimateInvalidArgumentException(option,argv[i]);
- resource_info.pause=(unsigned int) StringToLong(argv[i]);
+ resource_info.pause=(unsigned int) StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("page",option+1) == 0)
ThrowAnimateException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowAnimateInvalidArgumentException(option,argv[i]);
- quantize_info->tree_depth=(unsigned long) StringToLong(argv[i]);
+ quantize_info->tree_depth=StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("trim",option+1) == 0)
"pageGeometry",(char *) NULL);
resource_value=XGetResourceInstance(resource_database,GetClientName(),
"quality","75");
- image_info->quality=(unsigned long) StringToLong(resource_value);
+ image_info->quality=StringToUnsignedLong(resource_value);
resource_value=XGetResourceInstance(resource_database,GetClientName(),
"verbose","False");
image_info->verbose=IsMagickTrue(resource_value);
ThrowDisplayException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowDisplayInvalidArgumentException(option,argv[i]);
- resource_info.border_width=(unsigned int) StringToLong(argv[i]);
+ resource_info.border_width=(unsigned int) StringToUnsignedLong(argv[i]);
break;
}
ThrowDisplayException(OptionError,"UnrecognizedOption",option);
ThrowDisplayException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowDisplayInvalidArgumentException(option,argv[i]);
- quantize_info->number_colors=(unsigned long) StringToLong(argv[i]);
+ quantize_info->number_colors=StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("colorspace",option+1) == 0)
ThrowDisplayException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowDisplayInvalidArgumentException(option,argv[i]);
- iterations=(unsigned long) StringToLong(argv[i]);
+ iterations=StringToUnsignedLong(argv[i]);
break;
}
ThrowDisplayException(OptionError,"UnrecognizedOption",option);
ThrowDisplayException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowDisplayInvalidArgumentException(option,argv[i]);
- resource_info.magnify=(unsigned int) StringToLong(argv[i]);
+ resource_info.magnify=(unsigned int) StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("map",option+1) == 0)
ThrowDisplayException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowDisplayInvalidArgumentException(option,argv[i]);
- quantize_info->tree_depth=(unsigned long) StringToLong(argv[i]);
+ quantize_info->tree_depth=StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("trim",option+1) == 0)
ThrowDisplayException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowDisplayInvalidArgumentException(option,argv[i]);
- resource_info.update=(unsigned int) StringToLong(argv[i]);
+ resource_info.update=(unsigned int) StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("use-pixmap",option+1) == 0)
{
value=GetXMLTreeContent(child);
if (value != (const char *) NULL)
- CurrentContext->weight=(unsigned long) StringToLong(value);
+ CurrentContext->weight=StringToUnsignedLong(value);
}
child=GetXMLTreeChild(xml_info,"gravity");
if (child != (XMLTreeInfo *) NULL)
{
value=GetXMLTreeContent(child);
if (value != (const char *) NULL)
- CurrentContext->miterlimit=(unsigned long) StringToLong(value);
+ CurrentContext->miterlimit=StringToUnsignedLong(value);
}
child=GetXMLTreeChild(xml_info,"stroke-opacity");
if (child != (XMLTreeInfo *) NULL)
ximage_info.borders=IsMagickTrue(resource_value);
resource_value=XGetResourceInstance(resource_database,GetClientName(),
"delay","0");
- resource_info.delay=(unsigned int) StringToLong(resource_value);
+ resource_info.delay=(unsigned int) StringToUnsignedLong(resource_value);
image_info->density=XGetResourceInstance(resource_database,GetClientName(),
"density",(char *) NULL);
resource_value=XGetResourceInstance(resource_database,GetClientName(),
"pageGeometry",(char *) NULL);
resource_value=XGetResourceInstance(resource_database,GetClientName(),
"pause","0");
- resource_info.pause=(unsigned int) StringToLong(resource_value);
+ resource_info.pause=(unsigned int) StringToUnsignedLong(resource_value);
resource_value=XGetResourceInstance(resource_database,GetClientName(),
"quality","85");
- image_info->quality=(unsigned long) StringToLong(resource_value);
+ image_info->quality=StringToUnsignedLong(resource_value);
resource_value=XGetResourceInstance(resource_database,GetClientName(),
"screen","False");
ximage_info.screen=IsMagickTrue(resource_value);
ThrowImportException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowImportInvalidArgumentException(option,argv[i]);
- quantize_info->number_colors=(unsigned long) StringToLong(argv[i]);
+ quantize_info->number_colors=StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("colorspace",option+1) == 0)
ThrowImportException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowImportInvalidArgumentException(option,argv[i]);
- resource_info.pause=(unsigned int) StringToLong(argv[i]);
+ resource_info.pause=(unsigned int) StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("ping",option+1) == 0)
ThrowImportException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowImportInvalidArgumentException(option,argv[i]);
- quantize_info->tree_depth=(unsigned long) StringToLong(argv[i]);
+ quantize_info->tree_depth=StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("trim",option+1) == 0)
if ((strlen(option) == 1) || ((*option != '-') && (*option != '+')))
continue;
if (LocaleCompare("bench",option+1) == 0)
- iterations=(unsigned long) StringToLong(argv[++i]);
+ iterations=StringToUnsignedLong(argv[++i]);
if (LocaleCompare("concurrent",option+1) == 0)
concurrent=MagickTrue;
if (LocaleCompare("debug",option+1) == 0)
Reduce the number of colors in the image.
*/
(void) SyncImageSettings(image_info,*image);
- quantize_info->number_colors=(unsigned long) StringToLong(argv[i+1]);
+ quantize_info->number_colors=StringToUnsignedLong(argv[i+1]);
if (quantize_info->number_colors == 0)
break;
if (((*image)->storage_class == DirectClass) ||
(void) SetImageDepth(*image,MAGICKCORE_QUANTUM_DEPTH);
break;
}
- (void) SetImageDepth(*image,(unsigned long) StringToLong(argv[i+1]));
+ (void) SetImageDepth(*image,StringToUnsignedLong(argv[i+1]));
break;
}
if (LocaleCompare("deskew",option+1) == 0)
Posterize image.
*/
(void) SyncImageSettings(image_info,*image);
- (void) PosterizeImage(*image,(unsigned long) StringToLong(argv[i+1]),
+ (void) PosterizeImage(*image,StringToUnsignedLong(argv[i+1]),
quantize_info->dither);
InheritException(exception,&(*image)->exception);
break;
}
if (LocaleCompare("treedepth",option+1) == 0)
{
- quantize_info->tree_depth=(unsigned long) StringToLong(argv[i+1]);
+ quantize_info->tree_depth=StringToUnsignedLong(argv[i+1]);
break;
}
if (LocaleCompare("trim",option+1) == 0)
}
if (LocaleCompare("weight",option+1) == 0)
{
- draw_info->weight=(unsigned long) StringToLong(argv[i+1]);
+ draw_info->weight=StringToUnsignedLong(argv[i+1]);
if (LocaleCompare(argv[i+1],"all") == 0)
draw_info->weight=0;
if (LocaleCompare(argv[i+1],"bold") == 0)
}
if (LocaleCompare("colors",option+1) == 0)
{
- image_info->colors=(unsigned long) StringToLong(argv[i+1]);
+ image_info->colors=StringToUnsignedLong(argv[i+1]);
break;
}
if (LocaleCompare("colorspace",option+1) == 0)
image_info->depth=MAGICKCORE_QUANTUM_DEPTH;
break;
}
- image_info->depth=(unsigned long) StringToLong(argv[i+1]);
+ image_info->depth=StringToUnsignedLong(argv[i+1]);
break;
}
if (LocaleCompare("display",option+1) == 0)
(void) SetImageOption(image_info,option+1,"0");
break;
}
- image_info->quality=(unsigned long) StringToLong(argv[i+1]);
+ image_info->quality=StringToUnsignedLong(argv[i+1]);
(void) SetImageOption(image_info,option+1,argv[i+1]);
break;
}
(void) SetImageOption(image_info,option+1,"0");
break;
}
- image_info->scene=(unsigned long) StringToLong(argv[i+1]);
+ image_info->scene=StringToUnsignedLong(argv[i+1]);
(void) SetImageOption(image_info,option+1,argv[i+1]);
break;
}
SeedPseudoRandomGenerator(seed);
break;
}
- seed=(unsigned long) StringToLong(argv[i+1]);
+ seed=StringToUnsignedLong(argv[i+1]);
SeedPseudoRandomGenerator(seed);
break;
}
*morph_image;
(void) SyncImagesSettings(image_info,*images);
- morph_image=MorphImages(*images,(unsigned long) StringToLong(argv[i+1]),
+ morph_image=MorphImages(*images,StringToUnsignedLong(argv[i+1]),
exception);
if (morph_image == (Image *) NULL)
{
ThrowMontageException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowMontageInvalidArgumentException(option,argv[i]);
- montage_info->border_width=(unsigned long) StringToLong(argv[i]);
+ montage_info->border_width=StringToUnsignedLong(argv[i]);
break;
}
if (LocaleCompare("bordercolor",option+1) == 0)
ThrowMontageException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowMontageInvalidArgumentException(option,argv[i]);
- montage_info->border_width=(unsigned long) StringToLong(argv[i]);
+ montage_info->border_width=StringToUnsignedLong(argv[i]);
break;
}
ThrowMontageException(OptionError,"UnrecognizedOption",option)