From: cristy Date: Thu, 13 Oct 2011 23:41:15 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6814 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=269c9413034627692b2a7d0a352f9dee4e8eada8;p=imagemagick --- diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index a8ff3f7ce..5e12b302b 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -1490,9 +1490,9 @@ void Magick::Image::opaque ( const Color &opaqueColor_, PixelInfo pen; ExceptionInfo exceptionInfo; GetExceptionInfo( &exceptionInfo ); - (void) QueryMagickColorCompliance(std::string(opaqueColor_).c_str(), + (void) QueryColorCompliance(std::string(opaqueColor_).c_str(), AllCompliance, &opaque, &exceptionInfo); - (void) QueryMagickColorCompliance(std::string(penColor_).c_str(), + (void) QueryColorCompliance(std::string(penColor_).c_str(), AllCompliance, &pen, &exceptionInfo); OpaquePaintImage ( image(), &opaque, &pen, MagickFalse, &exceptionInfo ); throwException( exceptionInfo ); @@ -2149,7 +2149,7 @@ void Magick::Image::transparent ( const Color &color_ ) std::string color = color_; PixelInfo target; - (void) QueryMagickColorCompliance(std::string(color_).c_str(),AllCompliance, + (void) QueryColorCompliance(std::string(color_).c_str(),AllCompliance, &target,&image()->exception); ExceptionInfo exceptionInfo; GetExceptionInfo( &exceptionInfo ); @@ -2175,9 +2175,9 @@ void Magick::Image::transparentChroma(const Color &colorLow_, PixelInfo targetLow; PixelInfo targetHigh; - (void) QueryMagickColorCompliance(std::string(colorLow_).c_str(), + (void) QueryColorCompliance(std::string(colorLow_).c_str(), AllCompliance,&targetLow,&image()->exception); - (void) QueryMagickColorCompliance(std::string(colorHigh_).c_str(), + (void) QueryColorCompliance(std::string(colorHigh_).c_str(), AllCompliance,&targetHigh,&image()->exception); ExceptionInfo exceptionInfo; GetExceptionInfo( &exceptionInfo ); diff --git a/MagickCore/color.c b/MagickCore/color.c index e30c5e570..7402e5108 100644 --- a/MagickCore/color.c +++ b/MagickCore/color.c @@ -1954,7 +1954,7 @@ static MagickBooleanType LoadColorList(const char *xml,const char *filename, { if (LocaleCompare((char *) keyword,"color") == 0) { - (void) QueryMagickColorCompliance(token,AllCompliance, + (void) QueryColorCompliance(token,AllCompliance, &color_info->color,exception); break; } @@ -2110,14 +2110,14 @@ static MagickBooleanType LoadColorLists(const char *filename, % % % % % % -% Q u e r y C o l o r C o m p l i e n c e % ++ Q u e r y C o l o r C o m p l i a n c e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% QueryColorCompliance() returns the red, green, blue, and opacity intensities -% for a given color name. +% QueryColorCompliance() returns the red, green, blue, and alpha +% intensities for a given color name and standards compliance. % % The format of the QueryColorCompliance method is: % @@ -2137,126 +2137,8 @@ static MagickBooleanType LoadColorLists(const char *filename, % o exception: return any errors or warnings in this structure. % */ - -static inline double MagickMin(const double x,const double y) -{ - if (x < y) - return(x); - return(y); -} - MagickExport MagickBooleanType QueryColorCompliance(const char *name, const ComplianceType compliance,PixelInfo *color,ExceptionInfo *exception) -{ - MagickBooleanType - status; - - PixelInfo - pixel; - - status=QueryMagickColorCompliance(name,compliance,&pixel,exception); - color->alpha=ClampToQuantum(pixel.alpha); - if (pixel.colorspace == CMYKColorspace) - { - color->red=ClampToQuantum((MagickRealType) - (QuantumRange-MagickMin(QuantumRange,(MagickRealType) (QuantumScale* - pixel.red*(QuantumRange-pixel.black)+pixel.black)))); - color->green=ClampToQuantum((MagickRealType) - (QuantumRange-MagickMin(QuantumRange,(MagickRealType) (QuantumScale* - pixel.green*(QuantumRange-pixel.black)+pixel.black)))); - color->blue=ClampToQuantum((MagickRealType) - (QuantumRange-MagickMin(QuantumRange,(MagickRealType) (QuantumScale* - pixel.blue*(QuantumRange-pixel.black)+pixel.black)))); - color->black=ClampToQuantum((MagickRealType) - (QuantumRange-MagickMin(QuantumRange,(MagickRealType) (QuantumScale* - pixel.black*(QuantumRange-pixel.black)+pixel.black)))); - return(status); - } - color->red=ClampToQuantum(pixel.red); - color->green=ClampToQuantum(pixel.green); - color->blue=ClampToQuantum(pixel.blue); - return(status); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -% Q u e r y C o l o r n a m e % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% QueryColorname() returns a named color for the given color intensity. If -% an exact match is not found, a rgb() color is returned instead. -% -% The format of the QueryColorname method is: -% -% MagickBooleanType QueryColorname(const Image *image, -% const PixelInfo *color,const ComplianceType compliance,char *name, -% ExceptionInfo *exception) -% -% A description of each parameter follows. -% -% o image: the image. -% -% o color: the color intensities. -% -% o compliance: Adhere to this color standard: SVG, X11, or XPM. -% -% o name: Return the color name or hex value. -% -% o exception: return any errors or warnings in this structure. -% -*/ -MagickExport MagickBooleanType QueryColorname(const Image *image, - const PixelInfo *color,const ComplianceType compliance,char *name, - ExceptionInfo *exception) -{ - PixelInfo - pixel; - - GetPixelInfo(image,&pixel); - SetPixelInfoPacket(image,color,&pixel); - return(QueryMagickColorname(image,&pixel,compliance,name,exception)); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -+ Q u e r y M a g i c k C o l o r C o m p l i a n c e % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% QueryMagickColorCompliance() returns the red, green, blue, and alpha -% intensities for a given color name and standards compliance. -% -% The format of the QueryMagickColorCompliance method is: -% -% MagickBooleanType QueryMagickColorCompliance(const char *name, -% const ComplianceType compliance,PixelInfo *color, -% ExceptionInfo *exception) -% -% A description of each parameter follows: -% -% o name: the color name (e.g. white, blue, yellow). -% -% o compliance: Adhere to this color standard: SVG, X11, or XPM. -% -% o color: the red, green, blue, and opacity intensities values of the -% named color in this structure. -% -% o exception: return any errors or warnings in this structure. -% -*/ -MagickExport MagickBooleanType QueryMagickColorCompliance(const char *name, - const ComplianceType compliance,PixelInfo *color,ExceptionInfo *exception) { GeometryInfo geometry_info; @@ -2498,20 +2380,20 @@ MagickExport MagickBooleanType QueryMagickColorCompliance(const char *name, % % % % % % -% Q u e r y M a g i c k C o l o r n a m e % +% Q u e r y C o l o r n a m e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% QueryMagickColorname() returns a named color for the given color intensity. +% QueryColorname() returns a named color for the given color intensity. % If an exact match is not found, a hex value is returned instead. For % example an intensity of rgb:(0,0,0) returns black whereas rgb:(223,223,223) % returns #dfdfdf. % -% The format of the QueryMagickColorname method is: +% The format of the QueryColorname method is: % -% MagickBooleanType QueryMagickColorname(const Image *image, +% MagickBooleanType QueryColorname(const Image *image, % const PixelInfo *color,const ComplianceType compliance,char *name, % ExceptionInfo *exception) % @@ -2528,7 +2410,15 @@ MagickExport MagickBooleanType QueryMagickColorCompliance(const char *name, % o exception: return any errors or warnings in this structure. % */ -MagickExport MagickBooleanType QueryMagickColorname(const Image *image, + +static inline double MagickMin(const double x,const double y) +{ + if (x < y) + return(x); + return(y); +} + +MagickExport MagickBooleanType QueryColorname(const Image *image, const PixelInfo *color,const ComplianceType compliance,char *name, ExceptionInfo *exception) { diff --git a/MagickCore/color.h b/MagickCore/color.h index 2761257c9..f8c438cdf 100644 --- a/MagickCore/color.h +++ b/MagickCore/color.h @@ -77,11 +77,7 @@ extern MagickExport MagickBooleanType ListColorInfo(FILE *,ExceptionInfo *), QueryColorCompliance(const char *,const ComplianceType,PixelInfo *, ExceptionInfo *), - QueryColorname(const Image *,const PixelInfo *,const ComplianceType,char *, - ExceptionInfo *), - QueryMagickColorCompliance(const char *,const ComplianceType,PixelInfo *, - ExceptionInfo *), - QueryMagickColorname(const Image *,const PixelInfo *,const ComplianceType, + QueryColorname(const Image *,const PixelInfo *,const ComplianceType, char *,ExceptionInfo *); extern MagickExport void diff --git a/MagickCore/compare.c b/MagickCore/compare.c index 10f56cbbf..dc9f62307 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -161,17 +161,17 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image, return((Image *) NULL); } (void) SetImageAlphaChannel(highlight_image,OpaqueAlphaChannel,exception); - (void) QueryMagickColorCompliance("#f1001ecc",AllCompliance,&highlight, + (void) QueryColorCompliance("#f1001ecc",AllCompliance,&highlight, exception); artifact=GetImageArtifact(image,"highlight-color"); if (artifact != (const char *) NULL) - (void) QueryMagickColorCompliance(artifact,AllCompliance,&highlight, + (void) QueryColorCompliance(artifact,AllCompliance,&highlight, exception); - (void) QueryMagickColorCompliance("#ffffffcc",AllCompliance,&lowlight, + (void) QueryColorCompliance("#ffffffcc",AllCompliance,&lowlight, exception); artifact=GetImageArtifact(image,"lowlight-color"); if (artifact != (const char *) NULL) - (void) QueryMagickColorCompliance(artifact,AllCompliance,&lowlight, + (void) QueryColorCompliance(artifact,AllCompliance,&lowlight, exception); if (highlight_image->colorspace == CMYKColorspace) { diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 6abf33db6..f82d61901 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -1540,7 +1540,7 @@ static MagickRealType FxGetSymbol(FxInfo *fx_info,const PixelChannel channel, p+=strlen(name); } else - if (QueryMagickColorCompliance(name,AllCompliance,&pixel,fx_info->exception) != MagickFalse) + if (QueryColorCompliance(name,AllCompliance,&pixel,fx_info->exception) != MagickFalse) { (void) AddValueToSplayTree(fx_info->colors,ConstantString(name), ClonePixelInfo(&pixel)); diff --git a/MagickCore/histogram.c b/MagickCore/histogram.c index 37486040f..9078fc3c8 100644 --- a/MagickCore/histogram.c +++ b/MagickCore/histogram.c @@ -1154,7 +1154,7 @@ MagickExport size_t GetNumberColors(const Image *image,FILE *file, tuple); } (void) ConcatenateMagickString(tuple,")",MaxTextExtent); - (void) QueryMagickColorname(image,&pixel,SVGCompliance,color,exception); + (void) QueryColorname(image,&pixel,SVGCompliance,color,exception); GetColorTuple(&pixel,MagickTrue,hex); (void) FormatLocaleFile(file,"%10" MagickSizeFormat,p->count); (void) FormatLocaleFile(file,": %s %s %s\n",tuple,hex,color); diff --git a/MagickCore/identify.c b/MagickCore/identify.c index 5b60422f4..1e5c6cdea 100644 --- a/MagickCore/identify.c +++ b/MagickCore/identify.c @@ -605,7 +605,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file, GetPixelInfo(image,&pixel); SetPixelInfo(image,p,&pixel); - (void) QueryMagickColorname(image,&pixel,SVGCompliance,tuple, + (void) QueryColorname(image,&pixel,SVGCompliance,tuple, exception); (void) FormatLocaleFile(file," Alpha: %s ",tuple); GetColorTuple(&pixel,MagickTrue,tuple); @@ -670,7 +670,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file, X11Compliance,tuple); } (void) ConcatenateMagickString(tuple,")",MaxTextExtent); - (void) QueryMagickColorname(image,&pixel,SVGCompliance,color, + (void) QueryColorname(image,&pixel,SVGCompliance,color, exception); GetColorTuple(&pixel,MagickTrue,hex); (void) FormatLocaleFile(file," %8ld: %s %s %s\n",(long) i,tuple, diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index 7c6d7c905..025732ef1 100644 --- a/MagickCore/magick-config.h +++ b/MagickCore/magick-config.h @@ -12,7 +12,9 @@ /* #undef AUTOTRACE_DELEGATE */ /* Define if coders and filters are to be built as modules. */ -/* #undef BUILD_MODULES */ +#ifndef MAGICKCORE_BUILD_MODULES +#define MAGICKCORE_BUILD_MODULES 1 +#endif /* Define if you have the bzip2 library */ #ifndef MAGICKCORE_BZLIB_DELEGATE @@ -75,7 +77,9 @@ #endif /* Define if you have FFTW library */ -/* #undef FFTW_DELEGATE */ +#ifndef MAGICKCORE_FFTW_DELEGATE +#define MAGICKCORE_FFTW_DELEGATE 1 +#endif /* Location of filter modules */ #ifndef MAGICKCORE_FILTER_PATH @@ -217,7 +221,9 @@ #endif /* Define to 1 if you have the header file. */ -/* #undef HAVE_CL_CL_H */ +#ifndef MAGICKCORE_HAVE_CL_CL_H +#define MAGICKCORE_HAVE_CL_CL_H 1 +#endif /* Define to 1 if you have the header file. */ #ifndef MAGICKCORE_HAVE_COMPLEX_H @@ -435,15 +441,15 @@ #endif /* Define if you have the header file. */ -#ifndef MAGICKCORE_HAVE_LCMS2_H -#define MAGICKCORE_HAVE_LCMS2_H 1 -#endif +/* #undef HAVE_LCMS2_H */ /* Define if you have the header file. */ /* #undef HAVE_LCMS2_LCMS2_H */ /* Define if you have the header file. */ -/* #undef HAVE_LCMS_H */ +#ifndef MAGICKCORE_HAVE_LCMS_H +#define MAGICKCORE_HAVE_LCMS_H 1 +#endif /* Define if you have the header file. */ /* #undef HAVE_LCMS_LCMS_H */ @@ -1166,7 +1172,9 @@ #endif /* Define if you have JBIG library */ -/* #undef JBIG_DELEGATE */ +#ifndef MAGICKCORE_JBIG_DELEGATE +#define MAGICKCORE_JBIG_DELEGATE 1 +#endif /* Define if you have JPEG version 2 "Jasper" library */ #ifndef MAGICKCORE_JP2_DELEGATE @@ -1195,7 +1203,9 @@ #endif /* Define if you have LQR library */ -/* #undef LQR_DELEGATE */ +#ifndef MAGICKCORE_LQR_DELEGATE +#define MAGICKCORE_LQR_DELEGATE 1 +#endif /* Define if using libltdl to support dynamically loadable modules */ #ifndef MAGICKCORE_LTDL_DELEGATE @@ -1207,7 +1217,7 @@ /* 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/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" +#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:/opt/intel/lib/intel64:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/xulrunner-2" #endif /* The archive extension */ @@ -1258,7 +1268,9 @@ /* #undef NO_MINUS_C_MINUS_O */ /* Define if you have OPENEXR library */ -/* #undef OPENEXR_DELEGATE */ +#ifndef MAGICKCORE_OPENEXR_DELEGATE +#define MAGICKCORE_OPENEXR_DELEGATE 1 +#endif /* Define to the address where bug reports for this package should be sent. */ #ifndef MAGICKCORE_PACKAGE_BUGREPORT @@ -1313,7 +1325,9 @@ #endif /* Define if you have RSVG library */ -/* #undef RSVG_DELEGATE */ +#ifndef MAGICKCORE_RSVG_DELEGATE +#define MAGICKCORE_RSVG_DELEGATE 1 +#endif /* Define to the type of arg 1 for `select'. */ #ifndef MAGICKCORE_SELECT_TYPE_ARG1 @@ -1455,7 +1469,9 @@ /* Define if you have WEBP library */ -/* #undef WEBP_DELEGATE */ +#ifndef MAGICKCORE_WEBP_DELEGATE +#define MAGICKCORE_WEBP_DELEGATE 1 +#endif /* Define to use the Windows GDI32 library */ /* #undef WINGDI32_DELEGATE */ @@ -1464,7 +1480,9 @@ /* #undef WITH_DMALLOC */ /* Define if you have WMF library */ -/* #undef WMF_DELEGATE */ +#ifndef MAGICKCORE_WMF_DELEGATE +#define MAGICKCORE_WMF_DELEGATE 1 +#endif /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -1520,7 +1538,9 @@ /* #undef _MINIX */ /* Define this for the OpenCL Accelerator */ -/* #undef _OPENCL */ +#ifndef MAGICKCORE__OPENCL +#define MAGICKCORE__OPENCL 1 +#endif /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ diff --git a/MagickCore/methods.h b/MagickCore/methods.h index 23bf50f67..d7858f181 100644 --- a/MagickCore/methods.h +++ b/MagickCore/methods.h @@ -836,7 +836,7 @@ extern "C" { #define QuantizeImages PrependMagickMethod(QuantizeImages) #define QueryColorDatabase PrependMagickMethod(QueryColorDatabase) #define QueryColorname PrependMagickMethod(QueryColorname) -#define QueryMagickColorname PrependMagickMethod(QueryMagickColorname) +#define QueryColorname PrependMagickMethod(QueryColorname) #define QueryMagickColor PrependMagickMethod(QueryMagickColor) #define QueueAuthenticNexus PrependMagickMethod(QueueAuthenticNexus) #define QueueAuthenticPixels PrependMagickMethod(QueueAuthenticPixels) diff --git a/MagickCore/property.c b/MagickCore/property.c index ab13b65b1..37ba9783b 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -2086,7 +2086,7 @@ MagickExport const char *GetImageProperty(const Image *image, char name[MaxTextExtent]; - (void) QueryMagickColorname(image,&pixel,SVGCompliance,name, + (void) QueryColorname(image,&pixel,SVGCompliance,name, exception); (void) SetImageProperty((Image *) image,property,name); return(GetImageProperty(image,property)); diff --git a/MagickCore/version.h b/MagickCore/version.h index 557c38c74..d50ee27b0 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,7 +27,7 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC" -#define MagickSVNRevision "5636" +#define MagickSVNRevision "exported" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c index 435496f4e..4a232a838 100644 --- a/MagickCore/xwindow.c +++ b/MagickCore/xwindow.c @@ -7528,7 +7528,7 @@ MagickPrivate void XMakeMagnifyImage(Display *display,XWindows *windows) y+=height; (void) XDrawImageString(display,windows->magnify.pixmap, windows->magnify.annotate_context,x,y,tuple,(int) strlen(tuple)); - (void) QueryMagickColorname(windows->image.image,&pixel,SVGCompliance,tuple, + (void) QueryColorname(windows->image.image,&pixel,SVGCompliance,tuple, &windows->image.image->exception); y+=height; (void) XDrawImageString(display,windows->magnify.pixmap, diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index 6ab1f5a57..f4a69df11 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -6747,7 +6747,7 @@ WandExport MagickBooleanType MagickNewImage(MagickWand *wand,const size_t width, if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); PixelGetMagickColor(background,&pixel); - images=NewMagickImage(wand->image_info,width,height,&pixel,&wand->exception); + images=NewMagickImage(wand->image_info,width,height,&pixel,wand->exception); if (images == (Image *) NULL) return(MagickFalse); return(InsertImageInWand(wand,images)); diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index 0e99e9667..be5d208fe 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -534,7 +534,7 @@ static Image *SparseColorOption(const Image *image, if ( token[0] == '\0' ) break; if ( isalpha((int) token[0]) || token[0] == '#' ) { /* Color string given */ - (void) QueryMagickColorCompliance(token,AllCompliance,&color,exception); + (void) QueryColorCompliance(token,AllCompliance,&color,exception); if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) sparse_arguments[x++] = QuantumScale*color.red; if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0) @@ -1565,7 +1565,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, GetPixelInfo(*image,&fill); if (*option == '+') { - (void) QueryMagickColorCompliance("none",AllCompliance,&fill, + (void) QueryColorCompliance("none",AllCompliance,&fill, exception); (void) QueryColorCompliance("none",AllCompliance, &draw_info->fill,exception); @@ -1574,7 +1574,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, break; } sans=AcquireExceptionInfo(); - (void) QueryMagickColorCompliance(argv[i+1],AllCompliance,&fill, + (void) QueryColorCompliance(argv[i+1],AllCompliance,&fill, sans); status=QueryColorCompliance(argv[i+1],AllCompliance, &draw_info->fill,sans); @@ -1603,7 +1603,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, */ (void) SyncImageSettings(mogrify_info,*image); (void) ParsePageGeometry(*image,argv[i+1],&geometry,exception); - (void) QueryMagickColorCompliance(argv[i+2],AllCompliance,&target, + (void) QueryColorCompliance(argv[i+2],AllCompliance,&target, exception); (void) FloodfillPaintImage(*image,draw_info,&target,geometry.x, geometry.y,*option == '-' ? MagickFalse : MagickTrue,exception); @@ -1934,10 +1934,10 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, p=(const char *) argv[i+1]; GetMagickToken(p,&p,token); /* get black point color */ if ((isalpha((int) *token) != 0) || ((*token == '#') != 0)) - (void) QueryMagickColorCompliance(token,AllCompliance, + (void) QueryColorCompliance(token,AllCompliance, &black_point,exception); else - (void) QueryMagickColorCompliance("#000000",AllCompliance, + (void) QueryColorCompliance("#000000",AllCompliance, &black_point,exception); if (isalpha((int) token[0]) || (token[0] == '#')) GetMagickToken(p,&p,token); @@ -1948,10 +1948,10 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, if ((isalpha((int) *token) == 0) && ((*token == '#') == 0)) GetMagickToken(p,&p,token); /* Get white point color. */ if ((isalpha((int) *token) != 0) || ((*token == '#') != 0)) - (void) QueryMagickColorCompliance(token,AllCompliance, + (void) QueryColorCompliance(token,AllCompliance, &white_point,exception); else - (void) QueryMagickColorCompliance("#ffffff",AllCompliance, + (void) QueryColorCompliance("#ffffff",AllCompliance, &white_point,exception); } (void) LevelImageColors(*image,&black_point,&white_point, @@ -2220,7 +2220,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, target; (void) SyncImageSettings(mogrify_info,*image); - (void) QueryMagickColorCompliance(argv[i+1],AllCompliance,&target, + (void) QueryColorCompliance(argv[i+1],AllCompliance,&target, exception); (void) OpaquePaintImage(*image,&target,&fill,*option == '-' ? MagickFalse : MagickTrue,exception); @@ -2996,7 +2996,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, target; (void) SyncImageSettings(mogrify_info,*image); - (void) QueryMagickColorCompliance(argv[i+1],AllCompliance,&target, + (void) QueryColorCompliance(argv[i+1],AllCompliance,&target, exception); (void) TransparentPaintImage(*image,&target,(Quantum) TransparentAlpha,*option == '-' ? MagickFalse : MagickTrue, diff --git a/MagickWand/operation.c b/MagickWand/operation.c index 5cfeedc6b..9ac35816e 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -291,7 +291,7 @@ static Image *SparseColorOption(const Image *image, if ( token[0] == '\0' ) break; if ( isalpha((int) token[0]) || token[0] == '#' ) { /* Color string given */ - (void) QueryMagickColorCompliance(token,AllCompliance,&color, + (void) QueryColorCompliance(token,AllCompliance,&color, exception); if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) sparse_arguments[x++] = QuantumScale*color.red; @@ -772,7 +772,7 @@ WandExport MagickBooleanType ApplySettingsOption(ImageInfo *image_info, (void) SetImageOption(image_info,option,value); sans=AcquireExceptionInfo(); - /*(void) QueryMagickColorCompliance(value,AllCompliance,&fill,sans);*/ + /*(void) QueryColorCompliance(value,AllCompliance,&fill,sans);*/ status=QueryColorCompliance(value,AllCompliance,&draw_info->fill,sans); sans=DestroyExceptionInfo(sans); @@ -2323,7 +2323,7 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand, */ (void) SyncImageSettings(image_info,*image); (void) ParsePageGeometry(*image,argv[1],&geometry,exception); - (void) QueryMagickColorCompliance(argv[2],AllCompliance,&target, + (void) QueryColorCompliance(argv[2],AllCompliance,&target, exception); (void) FloodfillPaintImage(*image,draw_info,&target,geometry.x, geometry.y,*argv[0] == '-' ? MagickFalse : MagickTrue,exception); @@ -2625,10 +2625,10 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand, p=(const char *) argv[1]; GetMagickToken(p,&p,token); /* get black point color */ if ((isalpha((int) *token) != 0) || ((*token == '#') != 0)) - (void) QueryMagickColorCompliance(token,AllCompliance, + (void) QueryColorCompliance(token,AllCompliance, &black_point,exception); else - (void) QueryMagickColorCompliance("#000000",AllCompliance, + (void) QueryColorCompliance("#000000",AllCompliance, &black_point,exception); if (isalpha((int) token[0]) || (token[0] == '#')) GetMagickToken(p,&p,token); @@ -2639,10 +2639,10 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand, if ((isalpha((int) *token) == 0) && ((*token == '#') == 0)) GetMagickToken(p,&p,token); /* Get white point color. */ if ((isalpha((int) *token) != 0) || ((*token == '#') != 0)) - (void) QueryMagickColorCompliance(token,AllCompliance, + (void) QueryColorCompliance(token,AllCompliance, &white_point,exception); else - (void) QueryMagickColorCompliance("#ffffff",AllCompliance, + (void) QueryColorCompliance("#ffffff",AllCompliance, &white_point,exception); } (void) LevelImageColors(*image,&black_point,&white_point, @@ -2911,7 +2911,7 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand, target; (void) SyncImageSettings(image_info,*image); - (void) QueryMagickColorCompliance(argv[1],AllCompliance,&target, + (void) QueryColorCompliance(argv[1],AllCompliance,&target, exception); (void) OpaquePaintImage(*image,&target,&fill,*argv[0] == '-' ? MagickFalse : MagickTrue,exception); @@ -3652,7 +3652,7 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand, target; (void) SyncImageSettings(image_info,*image); - (void) QueryMagickColorCompliance(argv[1],AllCompliance,&target, + (void) QueryColorCompliance(argv[1],AllCompliance,&target, exception); (void) TransparentPaintImage(*image,&target,(Quantum) TransparentAlpha,*argv[0] == '-' ? MagickFalse : MagickTrue, diff --git a/MagickWand/pixel-wand.c b/MagickWand/pixel-wand.c index 130266127..0d6c6e64d 100644 --- a/MagickWand/pixel-wand.c +++ b/MagickWand/pixel-wand.c @@ -1698,7 +1698,7 @@ WandExport MagickBooleanType PixelSetColor(PixelWand *wand,const char *color) assert(wand->signature == WandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - status=QueryMagickColorCompliance(color,AllCompliance,&pixel,wand->exception); + status=QueryColorCompliance(color,AllCompliance,&pixel,wand->exception); if (status != MagickFalse) wand->pixel=pixel; return(status); diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index f892e4788..2725a4923 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -1818,7 +1818,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image, { if ((strchr(SvPV(sval,na),',') == 0) || (strchr(SvPV(sval,na),')') != 0)) - QueryMagickColorCompliance(SvPV(sval,na),AllCompliance, + QueryColorCompliance(SvPV(sval,na),AllCompliance, &pixel,exception); else { @@ -7535,7 +7535,7 @@ Mogrify(ref,...) target.blue=virtual_pixel[BluePixelChannel]; target.alpha=virtual_pixel[AlphaPixelChannel]; if (attribute_flag[0] != 0) - (void) QueryMagickColorCompliance(argument_list[0].string_reference, + (void) QueryColorCompliance(argument_list[0].string_reference, AllCompliance,&target,exception); if (attribute_flag[1] == 0) argument_list[1].string_reference="100%"; @@ -8227,7 +8227,7 @@ Mogrify(ref,...) invert=MagickFalse; if (attribute_flag[4] != 0) { - QueryMagickColorCompliance(argument_list[4].string_reference, + QueryColorCompliance(argument_list[4].string_reference, AllCompliance,&target,exception); invert=MagickTrue; } @@ -8792,7 +8792,7 @@ Mogrify(ref,...) target.blue=virtual_pixel[BluePixelChannel]; target.alpha=virtual_pixel[AlphaPixelChannel]; if (attribute_flag[4] != 0) - QueryMagickColorCompliance(argument_list[4].string_reference, + QueryColorCompliance(argument_list[4].string_reference, AllCompliance,&target,exception); if (attribute_flag[3] != 0) target.alpha=SiPrefixToDouble(argument_list[3].string_reference, @@ -8882,15 +8882,15 @@ Mogrify(ref,...) fill_color, target; - (void) QueryMagickColorCompliance("none",AllCompliance,&target, + (void) QueryColorCompliance("none",AllCompliance,&target, exception); - (void) QueryMagickColorCompliance("none",AllCompliance,&fill_color, + (void) QueryColorCompliance("none",AllCompliance,&fill_color, exception); if (attribute_flag[0] != 0) - (void) QueryMagickColorCompliance(argument_list[0].string_reference, + (void) QueryColorCompliance(argument_list[0].string_reference, AllCompliance,&target,exception); if (attribute_flag[1] != 0) - (void) QueryMagickColorCompliance(argument_list[1].string_reference, + (void) QueryColorCompliance(argument_list[1].string_reference, AllCompliance,&fill_color,exception); if (attribute_flag[2] != 0) image->fuzz=SiPrefixToDouble(argument_list[2].string_reference, @@ -9058,10 +9058,10 @@ Mogrify(ref,...) PixelInfo target; - (void) QueryMagickColorCompliance("none",AllCompliance,&target, + (void) QueryColorCompliance("none",AllCompliance,&target, exception); if (attribute_flag[0] != 0) - (void) QueryMagickColorCompliance(argument_list[0].string_reference, + (void) QueryColorCompliance(argument_list[0].string_reference, AllCompliance,&target,exception); opacity=TransparentAlpha; if (attribute_flag[1] != 0) @@ -9748,7 +9748,7 @@ Mogrify(ref,...) GetPixelInfo(image,&tint); if (attribute_flag[0] != 0) - (void) QueryMagickColorCompliance(argument_list[0].string_reference, + (void) QueryColorCompliance(argument_list[0].string_reference, AllCompliance,&tint,exception); if (attribute_flag[1] == 0) argument_list[1].string_reference="100"; @@ -10276,7 +10276,7 @@ Mogrify(ref,...) target.blue=virtual_pixel[BluePixelChannel]; target.alpha=virtual_pixel[AlphaPixelChannel]; if (attribute_flag[4] != 0) - QueryMagickColorCompliance(argument_list[4].string_reference, + QueryColorCompliance(argument_list[4].string_reference, AllCompliance,&target,exception); if (attribute_flag[5] != 0) image->fuzz=SiPrefixToDouble(argument_list[5].string_reference, @@ -10619,16 +10619,16 @@ Mogrify(ref,...) black_point, white_point; - (void) QueryMagickColorCompliance("#000000",AllCompliance, + (void) QueryColorCompliance("#000000",AllCompliance, &black_point,exception); - (void) QueryMagickColorCompliance("#ffffff",AllCompliance, + (void) QueryColorCompliance("#ffffff",AllCompliance, &white_point,exception); if (attribute_flag[1] != 0) - (void) QueryMagickColorCompliance( + (void) QueryColorCompliance( argument_list[1].string_reference,AllCompliance,&black_point, exception); if (attribute_flag[2] != 0) - (void) QueryMagickColorCompliance( + (void) QueryColorCompliance( argument_list[2].string_reference,AllCompliance,&white_point, exception); if (attribute_flag[3] != 0) @@ -10757,10 +10757,10 @@ Mogrify(ref,...) PixelInfo color; - (void) QueryMagickColorCompliance("none",AllCompliance,&color, + (void) QueryColorCompliance("none",AllCompliance,&color, exception); if (attribute_flag[0] != 0) - (void) QueryMagickColorCompliance(argument_list[0].string_reference, + (void) QueryColorCompliance(argument_list[0].string_reference, AllCompliance,&color,exception); (void) SetImageColor(image,&color); break; @@ -10946,7 +10946,7 @@ Montage(ref,...) */ info=GetPackageInfo(aTHX_ (void *) av,info,exception); montage_info=CloneMontageInfo(info->image_info,(MontageInfo *) NULL); - (void) QueryMagickColorCompliance("none",AllCompliance,&transparent_color, + (void) QueryColorCompliance("none",AllCompliance,&transparent_color, exception); for (i=2; i < items; i+=2) { @@ -11222,7 +11222,7 @@ Montage(ref,...) PixelInfo transparent_color; - QueryMagickColorCompliance(SvPV(ST(i),na),AllCompliance, + QueryColorCompliance(SvPV(ST(i),na),AllCompliance, &transparent_color,exception); for (next=image; next; next=next->next) (void) TransparentPaintImage(next,&transparent_color, @@ -11860,7 +11860,7 @@ QueryColor(ref,...) for (i=1; i < items; i++) { name=(char *) SvPV(ST(i),na); - if (QueryMagickColorCompliance(name,AllCompliance,&color,exception) == MagickFalse) + if (QueryColorCompliance(name,AllCompliance,&color,exception) == MagickFalse) { PUSHs(&sv_undef); continue; diff --git a/coders/msl.c b/coders/msl.c index f336015e6..d1190c3da 100644 --- a/coders/msl.c +++ b/coders/msl.c @@ -1413,7 +1413,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"fill") == 0) { - (void) QueryMagickColorCompliance(value,AllCompliance, + (void) QueryColorCompliance(value,AllCompliance, &target,&msl_info->image[n]->exception); break; } @@ -1659,7 +1659,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"bordercolor") == 0) { - (void) QueryMagickColorCompliance(value,AllCompliance, + (void) QueryColorCompliance(value,AllCompliance, &target,&exception); paint_method=FillToBorderMethod; break; @@ -3688,7 +3688,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"bordercolor") == 0) { - (void) QueryMagickColorCompliance(value,AllCompliance, + (void) QueryColorCompliance(value,AllCompliance, &target,&exception); paint_method=FillToBorderMethod; break; @@ -4225,9 +4225,9 @@ static void MSLStartElement(void *context,const xmlChar *tag, (const char *) tag); break; } - (void) QueryMagickColorCompliance("none",AllCompliance,&target, + (void) QueryColorCompliance("none",AllCompliance,&target, &exception); - (void) QueryMagickColorCompliance("none",AllCompliance,&fill_color, + (void) QueryColorCompliance("none",AllCompliance,&fill_color, &exception); if (attributes != (const xmlChar **) NULL) for (i=0; (attributes[i] != (const xmlChar *) NULL); i++) @@ -4260,7 +4260,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"fill") == 0) { - (void) QueryMagickColorCompliance(value,AllCompliance, + (void) QueryColorCompliance(value,AllCompliance, &fill_color,&exception); break; } @@ -7198,7 +7198,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, PixelInfo target; - (void) QueryMagickColorCompliance(value,AllCompliance,&target, + (void) QueryColorCompliance(value,AllCompliance,&target, &exception); (void) TransparentPaintImage(msl_info->image[n],&target, TransparentAlpha,MagickFalse,&msl_info->image[n]->exception); diff --git a/coders/svg.c b/coders/svg.c index 5db009686..6bff30f84 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -3399,7 +3399,7 @@ static MagickBooleanType TraceSVGImage(Image *image) for (x=0; x < (ssize_t) image->columns; x++) { SetPixelInfo(image,p,&pixel); - (void) QueryMagickColorname(image,&pixel,SVGCompliance,tuple, + (void) QueryColorname(image,&pixel,SVGCompliance,tuple, &image->exception); (void) FormatLocaleString(message,MaxTextExtent, " \n", diff --git a/coders/txt.c b/coders/txt.c index db0cda327..3f6cbdda9 100644 --- a/coders/txt.c +++ b/coders/txt.c @@ -697,7 +697,7 @@ static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image, (void) FormatLocaleString(buffer,MaxTextExtent,"%s",tuple); (void) WriteBlobString(image,buffer); (void) WriteBlobString(image," "); - (void) QueryMagickColorname(image,&pixel,SVGCompliance,tuple,exception); + (void) QueryColorname(image,&pixel,SVGCompliance,tuple,exception); (void) WriteBlobString(image,tuple); (void) WriteBlobString(image,"\n"); p+=GetPixelChannels(image); diff --git a/coders/xc.c b/coders/xc.c index d15fe41f9..1664ae8c4 100644 --- a/coders/xc.c +++ b/coders/xc.c @@ -127,7 +127,7 @@ static Image *ReadXCImage(const ImageInfo *image_info,ExceptionInfo *exception) if (image->rows == 0) image->rows=1; (void) CopyMagickString(image->filename,image_info->filename,MaxTextExtent); - status=QueryMagickColorCompliance((char *) image_info->filename,AllCompliance, + status=QueryColorCompliance((char *) image_info->filename,AllCompliance, &color,exception); if (status == MagickFalse) { diff --git a/coders/xpm.c b/coders/xpm.c index 1b16ce2aa..f07adc34d 100644 --- a/coders/xpm.c +++ b/coders/xpm.c @@ -741,7 +741,7 @@ static MagickBooleanType WritePICONImage(const ImageInfo *image_info, pixel.colorspace=RGBColorspace; pixel.depth=8; pixel.alpha=(MagickRealType) OpaqueAlpha; - (void) QueryMagickColorname(image,&pixel,XPMCompliance,name,exception); + (void) QueryColorname(image,&pixel,XPMCompliance,name,exception); if (transparent != MagickFalse) { if (i == (ssize_t) (colors-1)) @@ -977,7 +977,7 @@ static MagickBooleanType WriteXPMImage(const ImageInfo *image_info,Image *image, pixel.colorspace=RGBColorspace; pixel.depth=8; pixel.alpha=(MagickRealType) OpaqueAlpha; - (void) QueryMagickColorname(image,&pixel,XPMCompliance,name,exception); + (void) QueryColorname(image,&pixel,XPMCompliance,name,exception); if (i == opacity) (void) CopyMagickString(name,"None",MaxTextExtent); /*