//
# if defined(_VISUALC_)
# define MagickDLLExplicitTemplate
+# pragma warning( disable: 4275 )
# pragma warning( disable: 4273 ) /* Disable the stupid dll linkage warnings */
# pragma warning( disable: 4251 )
# endif
geometry_info;
MagickStatusType
- flags;
+ geometry_flags;
- flags=ParseGeometry(draw_info->density,&geometry_info);
+ geometry_flags=ParseGeometry(draw_info->density,&geometry_info);
resolution.x=geometry_info.rho;
resolution.y=geometry_info.sigma;
- if ((flags & SigmaValue) == 0)
+ if ((geometry_flags & SigmaValue) == 0)
resolution.y=resolution.x;
}
ft_status=FT_Set_Char_Size(face,(FT_F26Dot6) (64.0*draw_info->pointsize),
*image_view;
register unsigned char
- *p;
+ *r;
/*
Rasterize the glyph.
*/
image_view=AcquireAuthenticCacheView(image,exception);
- p=bitmap->bitmap.buffer;
+ r=bitmap->bitmap.buffer;
for (y=0; y < (ssize_t) bitmap->bitmap.rows; y++)
{
MagickBooleanType
continue;
}
if (bitmap->bitmap.pixel_mode != ft_pixel_mode_mono)
- fill_opacity=(double) (p[n])/(bitmap->bitmap.num_grays-1);
+ fill_opacity=(double) (r[n])/(bitmap->bitmap.num_grays-1);
else
- fill_opacity=((p[(x >> 3)+y*bitmap->bitmap.pitch] &
+ fill_opacity=((r[(x >> 3)+y*bitmap->bitmap.pitch] &
(1 << (~x & 0x07)))) == 0 ? 0.0 : 1.0;
if (draw_info->text_antialias == MagickFalse)
fill_opacity=fill_opacity >= 0.5 ? 1.0 : 0.0;
bounds;
register const Quantum
- *p;
+ *restrict p;
ssize_t
y;
RectangleInfo
bounding_box;
- register const Quantum
- *restrict p;
-
register ssize_t
x;
if (LocaleNCompare(filename,"fd:",3) == 0)
{
char
- mode[MagickPathExtent];
+ fileMode[MagickPathExtent];
- *mode=(*type);
- mode[1]='\0';
- image->blob->file_info.file=fdopen(StringToLong(filename+3),mode);
+ *fileMode =(*type);
+ fileMode[1]='\0';
+ image->blob->file_info.file=fdopen(StringToLong(filename+3),fileMode);
#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__OS2__)
if (strchr(type,'b') != (char *) NULL)
setmode(_fileno(image->blob->file_info.file),_O_BINARY);
if (*filename == '|')
{
char
- mode[MagickPathExtent];
+ fileMode[MagickPathExtent];
/*
Pipe image to or from a system command.
if (*type == 'w')
(void) signal(SIGPIPE,SIG_IGN);
#endif
- *mode=(*type);
- mode[1]='\0';
- image->blob->file_info.file=(FILE *) popen_utf8(filename+1,mode);
+ *fileMode =(*type);
+ fileMode[1]='\0';
+ image->blob->file_info.file=(FILE *) popen_utf8(filename+1, fileMode);
if (image->blob->file_info.file == (FILE *) NULL)
{
ThrowFileException(exception,BlobError,"UnableToOpenBlob",filename);
((cache_info->type == DiskCache) || (cache_info->type == MapCache)) &&
(cache_info->reference_count == 1))
{
- int
- status;
-
/*
Usurp existing persistent pixel cache.
*/
- status=rename_utf8(cache_info->cache_filename,filename);
- if (status == 0)
+ if (rename_utf8(cache_info->cache_filename, filename) == 0)
{
(void) CopyMagickString(cache_info->cache_filename,filename,
MagickPathExtent);
{
char
path[MagickPathExtent],
- *xml;
+ *fileXml;
GetPathComponent(filename,HeadPath,path);
if (*path != '\0')
(void) CopyMagickString(path,token,MagickPathExtent);
else
(void) ConcatenateMagickString(path,token,MagickPathExtent);
- xml=FileToXML(path,~0UL);
- if (xml != (char *) NULL)
+ fileXml=FileToXML(path,~0UL);
+ if (fileXml != (char *) NULL)
{
- status&=LoadCoderCache(coder_cache,xml,path,depth+1,
+ status&=LoadCoderCache(coder_cache,fileXml,path,depth+1,
exception);
- xml=(char *) RelinquishMagickMemory(xml);
+ fileXml=(char *) RelinquishMagickMemory(fileXml);
}
}
}
{
char
path[MagickPathExtent],
- *xml;
+ *fileXml;
GetPathComponent(filename,HeadPath,path);
if (*path != '\0')
(void) CopyMagickString(path,token,MagickPathExtent);
else
(void) ConcatenateMagickString(path,token,MagickPathExtent);
- xml=FileToXML(path,~0UL);
- if (xml != (char *) NULL)
+ fileXml=FileToXML(path,~0UL);
+ if (fileXml != (char *) NULL)
{
- status&=LoadColorCache(color_cache,xml,path,depth+1,
+ status&=LoadColorCache(color_cache,fileXml,path,depth+1,
exception);
- xml=(char *) RelinquishMagickMemory(xml);
+ fileXml=(char *) RelinquishMagickMemory(fileXml);
}
}
}
*colorname;
ColorspaceType
- colorspace;
+ colorspaceType;
- colorspace=color->colorspace;
+ colorspaceType=color->colorspace;
colorname=AcquireString(name+i+1);
(void) SubstituteString(&colorname,")","");
(void) QueryColorCompliance(colorname,AllCompliance,color,exception);
colorname=DestroyString(colorname);
- color->colorspace=colorspace;
+ color->colorspace=colorspaceType;
}
else
{
*restrict q;
register ssize_t
- i,
+ j,
x;
if (status == MagickFalse)
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp critical (MagickCore_GetAbsoluteError)
#endif
- for (i=0; i <= MaxPixelChannels; i++)
- distortion[i]+=channel_distortion[i];
+ for (j=0; j <= MaxPixelChannels; j++)
+ distortion[j]+=channel_distortion[j];
}
reconstruct_view=DestroyCacheView(reconstruct_view);
image_view=DestroyCacheView(image_view);
status;
register ssize_t
- i;
+ j;
size_t
columns,
*restrict q;
register ssize_t
- i,
x;
if (status == MagickFalse)
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp critical (MagickCore_GetFuzzDistortion)
#endif
- for (i=0; i <= MaxPixelChannels; i++)
- distortion[i]+=channel_distortion[i];
+ for (j=0; j <= MaxPixelChannels; j++)
+ distortion[j]+=channel_distortion[j];
}
reconstruct_view=DestroyCacheView(reconstruct_view);
image_view=DestroyCacheView(image_view);
- for (i=0; i <= MaxPixelChannels; i++)
- distortion[i]/=((double) columns*rows);
+ for (j=0; j <= MaxPixelChannels; j++)
+ distortion[j]/=((double) columns*rows);
distortion[CompositePixelChannel]/=(double) GetImageChannels(image);
distortion[CompositePixelChannel]=sqrt(distortion[CompositePixelChannel]);
return(status);
status;
register ssize_t
- i;
+ j;
size_t
columns,
*restrict q;
register ssize_t
- i,
x;
if (status == MagickFalse)
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp critical (MagickCore_GetMeanAbsoluteError)
#endif
- for (i=0; i <= MaxPixelChannels; i++)
- distortion[i]+=channel_distortion[i];
+ for (j=0; j <= MaxPixelChannels; j++)
+ distortion[j]+=channel_distortion[j];
}
reconstruct_view=DestroyCacheView(reconstruct_view);
image_view=DestroyCacheView(image_view);
- for (i=0; i <= MaxPixelChannels; i++)
- distortion[i]/=((double) columns*rows);
+ for (j=0; j <= MaxPixelChannels; j++)
+ distortion[j]/=((double) columns*rows);
distortion[CompositePixelChannel]/=(double) GetImageChannels(image);
return(status);
}
status;
register ssize_t
- i;
+ j;
size_t
columns,
*restrict q;
register ssize_t
- i,
x;
if (status == MagickFalse)
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp critical (MagickCore_GetMeanSquaredError)
#endif
- for (i=0; i <= MaxPixelChannels; i++)
- distortion[i]+=channel_distortion[i];
+ for (j=0; j <= MaxPixelChannels; j++)
+ distortion[j]+=channel_distortion[j];
}
reconstruct_view=DestroyCacheView(reconstruct_view);
image_view=DestroyCacheView(image_view);
- for (i=0; i <= MaxPixelChannels; i++)
- distortion[i]/=((double) columns*rows);
+ for (j=0; j <= MaxPixelChannels; j++)
+ distortion[j]/=((double) columns*rows);
distortion[CompositePixelChannel]/=GetImageChannels(image);
return(status);
}
*restrict q;
register ssize_t
- i,
+ j,
x;
if (status == MagickFalse)
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp critical (MagickCore_GetPeakAbsoluteError)
#endif
- for (i=0; i <= MaxPixelChannels; i++)
- if (channel_distortion[i] > distortion[i])
- distortion[i]=channel_distortion[i];
+ for (j=0; j <= MaxPixelChannels; j++)
+ if (channel_distortion[j] > distortion[j])
+ distortion[j]=channel_distortion[j];
}
reconstruct_view=DestroyCacheView(reconstruct_view);
image_view=DestroyCacheView(image_view);
case BlurCompositeOp:
{
CacheView
- *canvas_view,
- *source_view;
-
- const char
- *value;
+ *canvas_view;
MagickRealType
angle_range,
case DistortCompositeOp:
{
CacheView
- *source_view,
- *canvas_view,
- *image_view;
-
- const char
- *value;
+ *canvas_view;
MagickRealType
horizontal_scale,
}
case DissolveCompositeOp:
{
- const char
- *value;
-
/*
Geometry arguments to dissolve factors.
*/
}
case BlendCompositeOp:
{
- const char
- *value;
-
value=GetImageArtifact(image,"compose:args");
if (value != (char *) NULL)
{
}
case MathematicsCompositeOp:
{
- const char
- *value;
-
/*
Just collect the values from "compose:args", setting.
Unused values are set to zero automagically.
}
case ModulateCompositeOp:
{
- const char
- *value;
-
/*
Determine the luma and chroma scale.
*/
}
case ThresholdCompositeOp:
{
- const char
- *value;
-
/*
Determine the amount and threshold.
*/
{
char
path[MagickPathExtent],
- *xml;
+ *fileXml;
GetPathComponent(filename,HeadPath,path);
if (*path != '\0')
(void) CopyMagickString(path,token,MagickPathExtent);
else
(void) ConcatenateMagickString(path,token,MagickPathExtent);
- xml=FileToXML(path,~0UL);
- if (xml != (char *) NULL)
+ fileXml=FileToXML(path,~0UL);
+ if (fileXml != (char *) NULL)
{
- status&=LoadConfigureCache(configure_cache,xml,path,
+ status&=LoadConfigureCache(configure_cache,fileXml,path,
depth+1,exception);
- xml=(char *) RelinquishMagickMemory(xml);
+ fileXml=(char *) RelinquishMagickMemory(fileXml);
}
}
}
option=GetImageOption(image_info,"delay");
if (option != (const char *) NULL)
{
- GeometryInfo
- geometry_info;
-
flags=ParseGeometry(option,&geometry_info);
if ((flags & GreaterValue) != 0)
{
(GetMagickSeekableStream(magick_info) != MagickFalse))
{
char
- filename[MagickPathExtent];
+ image_filename[MagickPathExtent];
- (void) CopyMagickString(filename,image->filename,MagickPathExtent);
+ (void) CopyMagickString(image_filename,image->filename,MagickPathExtent);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
- (void) CopyMagickString(image->filename,filename,MagickPathExtent);
+ (void) CopyMagickString(image->filename, image_filename,MagickPathExtent);
if (status != MagickFalse)
{
if (IsBlobSeekable(image) == MagickFalse)
proceed;
MagickOffsetType
- i;
+ progress;
MagickProgressMonitor
progress_monitor;
*/
status=MagickTrue;
progress_monitor=(MagickProgressMonitor) NULL;
- i=0;
+ progress=0;
number_images=GetImageListLength(images);
for (p=images; p != (Image *) NULL; p=GetNextImageInList(p))
{
break;
if (number_images != 1)
{
- proceed=SetImageProgress(p,WriteImageTag,i++,number_images);
+ proceed=SetImageProgress(p,WriteImageTag,progress++,number_images);
if (proceed == MagickFalse)
break;
}
#define ThrowFatalException(severity,tag) \
{ \
char \
- *message; \
+ *fatal_message; \
\
ExceptionInfo \
- *exception; \
+ *fatal_exception; \
\
- exception=AcquireExceptionInfo(); \
- message=GetExceptionMessage(errno); \
- (void) ThrowMagickException(exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"`%s'",message); \
- message=DestroyString(message); \
- CatchException(exception); \
- (void) DestroyExceptionInfo(exception); \
+ fatal_exception=AcquireExceptionInfo(); \
+ fatal_message=GetExceptionMessage(errno); \
+ (void) ThrowMagickException(fatal_exception,GetMagickModule(),severity, \
+ tag == (const char *) NULL ? "unknown" : tag,"`%s'",fatal_message); \
+ fatal_message=DestroyString(fatal_message); \
+ CatchException(fatal_exception); \
+ (void) DestroyExceptionInfo(fatal_exception); \
MagickCoreTerminus(); \
_exit((int) (severity-FatalErrorException)+1); \
}
#define ThrowFileException(exception,severity,tag,context) \
{ \
char \
- *message; \
+ *file_message; \
\
- message=GetExceptionMessage(errno); \
+ file_message=GetExceptionMessage(errno); \
(void) ThrowMagickException(exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"'%s': %s",context,message); \
- message=DestroyString(message); \
+ tag == (const char *) NULL ? "unknown" : tag,"'%s': %s",context, \
+ file_message); \
+ file_message=DestroyString(file_message); \
}
#define ThrowImageException(severity,tag) \
{ \
#define ThrowWandFatalException(severity,tag,context) \
{ \
ExceptionInfo \
- *exception; \
+ *fatal_exception; \
\
- exception=AcquireExceptionInfo(); \
- (void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
+ fatal_exception=AcquireExceptionInfo(); \
+ (void) ThrowMagickException(fatal_exception,GetMagickModule(),severity,tag, \
"`%s'",context); \
- CatchException(exception); \
- (void) DestroyExceptionInfo(exception); \
+ CatchException(fatal_exception); \
+ (void) DestroyExceptionInfo(fatal_exception); \
MagickWandTerminus(); \
_exit((int) (severity-FatalErrorException)+1); \
}
vertical_factor=4;
if (image_info->sampling_factor != (char *) NULL)
{
- GeometryInfo
- geometry_info;
-
- MagickStatusType
- flags;
-
flags=ParseGeometry(image_info->sampling_factor,&geometry_info);
horizontal_factor=(ssize_t) geometry_info.rho;
vertical_factor=(ssize_t) geometry_info.sigma;
%
*/
#if defined(_VISUALC_)
+# pragma warning(disable : 4477)
static Image *ReadXTRNImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
clone_info=DestroyImageInfo(clone_info);
return(image);
}
+# pragma warning(default : 4477)
#endif
\f
/*
#endif
#if defined(_VISUALC_)
+# pragma warning(disable : 4477)
static MagickBooleanType WriteXTRNImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
}
return(MagickTrue);
}
+# pragma warning(default : 4477)
#endif