status=clReleaseMemObject(convolve_info->pixels);
if (convolve_info->filter != (cl_mem) NULL)
status=clReleaseMemObject(convolve_info->filter);
+ (void) status;
}
static ConvolveInfo *DestroyConvolveInfo(ConvolveInfo *convolve_info)
status=clReleaseCommandQueue(convolve_info->command_queue);
if (convolve_info->context != (cl_context) NULL)
status=clReleaseContext(convolve_info->context);
+ (void) status;
convolve_info=(ConvolveInfo *) RelinquishMagickMemory(convolve_info);
return(convolve_info);
}
glyph.id=FT_Get_Char_Index(face,'?');
if ((glyph.id != 0) && (last_glyph.id != 0))
{
- if (draw_info->kerning != 0.0)
+ if (fabs(draw_info->kerning) >= MagickEpsilon)
origin.x+=(FT_Pos) (64.0*direction*draw_info->kerning);
else
if (FT_HAS_KERNING(face))
if (status != 0)
continue;
if ((p == draw_info->text) || (bounds.xMin < metrics->bounds.x1))
- metrics->bounds.x1=bounds.xMin;
+ metrics->bounds.x1=(double) bounds.xMin;
if ((p == draw_info->text) || (bounds.yMin < metrics->bounds.y1))
- metrics->bounds.y1=bounds.yMin;
+ metrics->bounds.y1=(double) bounds.yMin;
if ((p == draw_info->text) || (bounds.xMax > metrics->bounds.x2))
- metrics->bounds.x2=bounds.xMax;
+ metrics->bounds.x2=(double) bounds.xMax;
if ((p == draw_info->text) || (bounds.yMax > metrics->bounds.y2))
- metrics->bounds.y2=bounds.yMax;
+ metrics->bounds.y2=(double) bounds.yMax;
if (draw_info->render != MagickFalse)
if ((draw_info->stroke.alpha != TransparentAlpha) ||
(draw_info->stroke_pattern != (Image *) NULL))
}
if ((bitmap->left+bitmap->bitmap.width) > metrics->width)
metrics->width=bitmap->left+bitmap->bitmap.width;
- if ((draw_info->interword_spacing != 0.0) &&
+ if ((fabs(draw_info->interword_spacing) >= MagickEpsilon) &&
(IsUTFSpace(GetUTFCode(p)) != MagickFalse) &&
(IsUTFSpace(code) == MagickFalse))
origin.x+=(FT_Pos) (64.0*direction*draw_info->interword_spacing);
else
origin.x+=(FT_Pos) (direction*face->glyph->advance.x);
- metrics->origin.x=origin.x;
- metrics->origin.y=origin.y;
+ metrics->origin.x=(double) origin.x;
+ metrics->origin.y=(double) origin.y;
if (last_glyph.id != 0)
FT_Done_Glyph(last_glyph.image);
last_glyph=glyph;
/*
Sample to compute bounding box.
*/
- identity=(draw_info->affine.sx == draw_info->affine.sy) &&
- (draw_info->affine.rx == 0.0) && (draw_info->affine.ry == 0.0) ?
- MagickTrue : MagickFalse;
+ identity=(fabs(draw_info->affine.sx-draw_info->affine.sy) < MagickEpsilon) &&
+ (fabs(draw_info->affine.rx) < MagickEpsilon) &&
+ (fabs(draw_info->affine.ry) < MagickEpsilon) ? MagickTrue : MagickFalse;
extent.x=0.0;
extent.y=0.0;
for (i=0; i <= (ssize_t) (strlen(draw_info->text)+2); i++)
*/
width=annotate_info.width;
height=annotate_info.height;
- if ((draw_info->affine.rx != 0.0) || (draw_info->affine.ry != 0.0))
+ if ((fabs(draw_info->affine.rx) >= MagickEpsilon) ||
+ (fabs(draw_info->affine.ry) >= MagickEpsilon))
{
- if (((draw_info->affine.sx-draw_info->affine.sy) == 0.0) &&
- ((draw_info->affine.rx+draw_info->affine.ry) == 0.0))
- annotate_info.degrees=(180.0/MagickPI)*
+ if ((fabs(draw_info->affine.sx-draw_info->affine.sy) < MagickEpsilon) &&
+ (fabs(draw_info->affine.rx+draw_info->affine.ry) < MagickEpsilon))
+ annotate_info.degrees=(double) (180.0/MagickPI)*
atan2(draw_info->affine.rx,draw_info->affine.sx);
}
(void) FormatLocaleString(annotate_info.geometry,MaxTextExtent,
MagickRealType
gamma;
- if (alpha == TransparentAlpha)
+ if (fabs(alpha-TransparentAlpha) < MagickEpsilon)
{
*composite=(*q);
return;
{
value=ciphertext[i] ^ key[i];
for (j=0; j < 4; j++)
- *p++=(value >> (8*j)) & 0xff;
+ *p++=(unsigned char) ((value >> (8*j)) & 0xff);
}
/*
Reset registers.
if (color.depth > 8)
{
#define SVGCompliant(component) ((MagickRealType) \
- ScaleCharToQuantum(ScaleQuantumToChar(ClampToQuantum(component))));
+ ScaleCharToQuantum(ScaleQuantumToChar(ClampToQuantum(component))))
MagickStatusType
status;
/*
SVG requires color depths > 8 expressed as percentages.
*/
- status=color.red == SVGCompliant(color.red);
- status&=color.green == SVGCompliant(color.green);
- status&=color.blue == SVGCompliant(color.blue);
- if (color.colorspace == CMYKColorspace)
- status&=color.black == SVGCompliant(color.black);
+ status=fabs(color.red-SVGCompliant(color.red)) < MagickEpsilon ?
+ MagickTrue : MagickFalse;
+ status&=fabs(color.green-SVGCompliant(color.green)) < MagickEpsilon ?
+ MagickTrue : MagickFalse;
+ status&=fabs(color.blue-SVGCompliant(color.blue)) < MagickEpsilon ?
+ MagickTrue : MagickFalse;
+ if (color.colorspace-CMYKColorspace)
+ status&=fabs(color.black-SVGCompliant(color.black)) < MagickEpsilon ?
+ MagickTrue : MagickFalse;
if (color.matte != MagickFalse)
- status&=color.alpha == SVGCompliant(color.alpha);
+ status&=fabs(color.alpha-SVGCompliant(color.alpha)) < MagickEpsilon ?
+ MagickTrue : MagickFalse;
if (status != MagickFalse)
color.depth=8;
}
p=(const ColorInfo *) GetNextValueInLinkedList(color_list);
while (p != (const ColorInfo *) NULL)
{
- if (((p->compliance & compliance) != 0) && ((p->color.red == color->red)) &&
- (p->color.green == color->green) && (p->color.blue == color->blue) &&
- (p->color.alpha == opacity))
+ if (((p->compliance & compliance) != 0) &&
+ ((fabs(p->color.red-color->red) < MagickEpsilon)) &&
+ (fabs(p->color.green-color->green) < MagickEpsilon) &&
+ (fabs(p->color.blue-color->blue) < MagickEpsilon) &&
+ (fabs(p->color.alpha-opacity) < MagickEpsilon))
{
(void) CopyMagickString(name,p->name,MaxTextExtent);
break;
return(y);
}
-static inline size_t MagickMin(const size_t x,
- const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport MagickBooleanType AcquireImageColormap(Image *image,
const size_t colors,ExceptionInfo *exception)
{
*L=0.0;
*a=0.5;
*b=0.5;
- if ((X == 0.0) && (Y == 0.0) && (Z == 0.0))
+ if ((fabs(X) < MagickEpsilon) && (fabs(Y) < MagickEpsilon) &&
+ (fabs(Z) < MagickEpsilon))
return;
fx=LabF1(X/D50X);
fy=LabF1(Y/D50Y);
gamma=DisplayGamma;
value=GetImageProperty(image,"gamma");
if (value != (const char *) NULL)
- gamma=1.0/InterpretLocaleValue(value,(char **) NULL) != 0.0 ?
- InterpretLocaleValue(value,(char **) NULL) : 1.0;
+ gamma=1.0/fabs(InterpretLocaleValue(value,(char **) NULL)) >=
+ MagickEpsilon ? InterpretLocaleValue(value,(char **) NULL) : 1.0;
film_gamma=FilmGamma;
value=GetImageProperty(image,"film-gamma");
if (value != (const char *) NULL)
gamma=DisplayGamma;
value=GetImageProperty(image,"gamma");
if (value != (const char *) NULL)
- gamma=1.0/InterpretLocaleValue(value,(char **) NULL) != 0.0 ?
- InterpretLocaleValue(value,(char **) NULL) : 1.0;
+ gamma=1.0/fabs(InterpretLocaleValue(value,(char **) NULL)) >=
+ MagickEpsilon ? InterpretLocaleValue(value,(char **) NULL) : 1.0;
film_gamma=FilmGamma;
value=GetImageProperty(image,"film-gamma");
if (value != (const char *) NULL)
else
{
if (((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) &&
- (GetPixelRed(image,p) != GetPixelRed(reconstruct_image,q)))
+ fabs(GetPixelRed(image,p)-GetPixelRed(reconstruct_image,q)) >= MagickEpsilon)
difference=MagickTrue;
- if (((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0) &&
- (GetPixelGreen(image,p) != GetPixelGreen(reconstruct_image,q)))
+ if (((GetPixelGreenTraits(image) & UpdatePixelTrait)-0) &&
+ fabs(GetPixelGreen(image,p)-GetPixelGreen(reconstruct_image,q)) >= MagickEpsilon)
difference=MagickTrue;
- if (((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0) &&
- (GetPixelBlue(image,p) != GetPixelBlue(reconstruct_image,q)))
+ if (((GetPixelBlueTraits(image) & UpdatePixelTrait)-0) &&
+ fabs(GetPixelBlue(image,p)-GetPixelBlue(reconstruct_image,q)) >= MagickEpsilon)
difference=MagickTrue;
- if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
- (image->matte != MagickFalse) &&
- (GetPixelAlpha(image,p) != GetPixelAlpha(reconstruct_image,q)))
- difference=MagickTrue;
- if ((((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
+ if ((((GetPixelBlackTraits(image) & UpdatePixelTrait)-0) &&
(image->colorspace == CMYKColorspace) &&
(reconstruct_image->colorspace == CMYKColorspace)) &&
- (GetPixelBlack(image,p) != GetPixelBlack(reconstruct_image,q)))
+ fabs(GetPixelBlack(image,p)-GetPixelBlack(reconstruct_image,q)) >= MagickEpsilon)
+ difference=MagickTrue;
+ if (((GetPixelAlphaTraits(image) & UpdatePixelTrait)-0) &&
+ (image->matte-MagickFalse) &&
+ fabs(GetPixelAlpha(image,p)-GetPixelAlpha(reconstruct_image,q)) >= MagickEpsilon)
difference=MagickTrue;
}
- if (difference != MagickFalse)
+ if (difference-MagickFalse)
SetPixelPixelInfo(highlight_image,&highlight,r);
else
SetPixelPixelInfo(highlight_image,&lowlight,r);
*hue=0.0;
*saturation=0.0;
*brightness=(double) (QuantumScale*max);
- if (max == 0.0)
+ if (fabs(max) < MagickEpsilon)
return;
*saturation=(double) (1.0-min/max);
delta=max-min;
- if (delta == 0.0)
+ if (fabs(delta) < MagickEpsilon)
return;
- if (red == max)
+ if (fabs(red-max) < MagickEpsilon)
*hue=(double) ((green-blue)/delta);
else
- if (green == max)
+ if (fabs(green-max) < MagickEpsilon)
*hue=(double) (2.0+(blue-red)/delta);
else
- if (blue == max)
+ if (fabs(blue-max) < MagickEpsilon)
*hue=(double) (4.0+(red-green)/delta);
*hue/=6.0;
if (*hue < 0.0)
/* #undef AUTOTRACE_DELEGATE */
/* Define if coders and filters are to be built as modules. */
-#ifndef MAGICKCORE_BUILD_MODULES
-#define MAGICKCORE_BUILD_MODULES 1
-#endif
+/* #undef BUILD_MODULES */
/* Define if you have the bzip2 library */
#ifndef MAGICKCORE_BZLIB_DELEGATE
#endif
/* Define if you have FFTW library */
-#ifndef MAGICKCORE_FFTW_DELEGATE
-#define MAGICKCORE_FFTW_DELEGATE 1
-#endif
+/* #undef FFTW_DELEGATE */
/* Location of filter modules */
#ifndef MAGICKCORE_FILTER_PATH
#endif
/* Define to 1 if you have the <CL/cl.h> header file. */
-#ifndef MAGICKCORE_HAVE_CL_CL_H
-#define MAGICKCORE_HAVE_CL_CL_H 1
-#endif
+/* #undef HAVE_CL_CL_H */
/* Define to 1 if you have the <complex.h> header file. */
#ifndef MAGICKCORE_HAVE_COMPLEX_H
#endif
/* Define if you have the <lcms2.h> header file. */
-/* #undef HAVE_LCMS2_H */
+#ifndef MAGICKCORE_HAVE_LCMS2_H
+#define MAGICKCORE_HAVE_LCMS2_H 1
+#endif
/* Define if you have the <lcms2/lcms2.h> header file. */
/* #undef HAVE_LCMS2_LCMS2_H */
/* Define if you have the <lcms.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS_H
-#define MAGICKCORE_HAVE_LCMS_H 1
-#endif
+/* #undef HAVE_LCMS_H */
/* Define if you have the <lcms/lcms.h> header file. */
/* #undef HAVE_LCMS_LCMS_H */
#endif
/* Define if you have JBIG library */
-#ifndef MAGICKCORE_JBIG_DELEGATE
-#define MAGICKCORE_JBIG_DELEGATE 1
-#endif
+/* #undef JBIG_DELEGATE */
/* Define if you have JPEG version 2 "Jasper" library */
#ifndef MAGICKCORE_JP2_DELEGATE
#endif
/* Define if you have LQR library */
-#ifndef MAGICKCORE_LQR_DELEGATE
-#define MAGICKCORE_LQR_DELEGATE 1
-#endif
+/* #undef LQR_DELEGATE */
/* Define if using libltdl to support dynamically loadable modules */
#ifndef MAGICKCORE_LTDL_DELEGATE
/* Define to the system default library search path. */
#ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
#endif
/* The archive extension */
/* #undef NO_MINUS_C_MINUS_O */
/* Define if you have OPENEXR library */
-#ifndef MAGICKCORE_OPENEXR_DELEGATE
-#define MAGICKCORE_OPENEXR_DELEGATE 1
-#endif
+/* #undef OPENEXR_DELEGATE */
/* Define to the address where bug reports for this package should be sent. */
#ifndef MAGICKCORE_PACKAGE_BUGREPORT
#endif
/* Define if you have RSVG library */
-#ifndef MAGICKCORE_RSVG_DELEGATE
-#define MAGICKCORE_RSVG_DELEGATE 1
-#endif
+/* #undef RSVG_DELEGATE */
/* Define to the type of arg 1 for `select'. */
#ifndef MAGICKCORE_SELECT_TYPE_ARG1
/* Define if you have WEBP library */
-#ifndef MAGICKCORE_WEBP_DELEGATE
-#define MAGICKCORE_WEBP_DELEGATE 1
-#endif
+/* #undef WEBP_DELEGATE */
/* Define to use the Windows GDI32 library */
/* #undef WINGDI32_DELEGATE */
/* #undef WITH_DMALLOC */
/* Define if you have WMF library */
-#ifndef MAGICKCORE_WMF_DELEGATE
-#define MAGICKCORE_WMF_DELEGATE 1
-#endif
+/* #undef WMF_DELEGATE */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
/* #undef _MINIX */
/* Define this for the OpenCL Accelerator */
-#ifndef MAGICKCORE__OPENCL
-#define MAGICKCORE__OPENCL 1
-#endif
+/* #undef _OPENCL */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision "exported"
+#define MagickSVNRevision "5300"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 7,0,0
#define MagickLibAddendum "-0"
#define MagickLibInterface 7
#define MagickLibMinInterface 7
-#define MagickReleaseDate "2011-09-20"
+#define MagickReleaseDate "2011-09-21"
#define MagickChangeDate "20110801"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)
<configure name="LIB_VERSION" value="0x700"/>
<configure name="LIB_VERSION_NUMBER" value="7,0,0,0"/>
<configure name="SVN_REVISION" value="5300" />
- <configure name="RELEASE_DATE" value="2011-09-16"/>
+ <configure name="RELEASE_DATE" value="2011-09-21"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>