From b6a294dc3cf6e0d7328c01e12a0701a6354c54d1 Mon Sep 17 00:00:00 2001 From: cristy Date: Mon, 3 Oct 2011 00:55:17 +0000 Subject: [PATCH] --- Magick++/lib/Drawable.cpp | 20 ++--- Magick++/lib/Image.cpp | 6 +- Magick++/lib/Magick++/Drawable.h | 12 +-- Magick++/lib/Magick++/Image.h | 2 +- Magick++/lib/Magick++/Include.h | 8 +- MagickCore/draw.c | 2 +- MagickCore/image.c | 23 +++-- MagickCore/image.h | 2 +- MagickCore/magick-config.h | 50 +++++++---- MagickCore/version.h | 2 +- MagickWand/compare.c | 18 ++-- MagickWand/drawing-wand.c | 102 +++++++++++------------ MagickWand/drawing-wand.h | 12 +-- MagickWand/drawtest.c | 2 +- MagickWand/magick-image.c | 70 ++++++++-------- MagickWand/magick-image.h | 2 +- MagickWand/pixel-wand.c | 139 +------------------------------ MagickWand/pixel-wand.h | 8 +- PerlMagick/Magick.xs | 6 +- coders/gradient.c | 2 +- coders/msl.c | 6 +- coders/png.c | 2 +- 22 files changed, 192 insertions(+), 304 deletions(-) diff --git a/Magick++/lib/Drawable.cpp b/Magick++/lib/Drawable.cpp index 082b36a72..33363b92f 100644 --- a/Magick++/lib/Drawable.cpp +++ b/Magick++/lib/Drawable.cpp @@ -609,17 +609,17 @@ Magick::DrawableBase* Magick::DrawableFillRule::copy() const } // Specify drawing fill alpha -Magick::DrawableFillOpacity::~DrawableFillOpacity ( void ) +Magick::DrawableFillAlpha::~DrawableFillAlpha ( void ) { } -void Magick::DrawableFillOpacity::operator() +void Magick::DrawableFillAlpha::operator() ( MagickCore::DrawingWand * context_ ) const { - DrawSetFillOpacity( context_, _alpha ); + DrawSetFillAlpha( context_, _alpha ); } -Magick::DrawableBase* Magick::DrawableFillOpacity::copy() const +Magick::DrawableBase* Magick::DrawableFillAlpha::copy() const { - return new DrawableFillOpacity(*this); + return new DrawableFillAlpha(*this); } // Specify text font @@ -1222,17 +1222,17 @@ Magick::DrawableBase* Magick::DrawableStrokeColor::copy() const } // Stroke alpha -Magick::DrawableStrokeOpacity::~DrawableStrokeOpacity ( void ) +Magick::DrawableStrokeAlpha::~DrawableStrokeAlpha ( void ) { } -void Magick::DrawableStrokeOpacity::operator() +void Magick::DrawableStrokeAlpha::operator() ( MagickCore::DrawingWand * context_ ) const { - DrawSetStrokeOpacity( context_, _alpha ); + DrawSetStrokeAlpha( context_, _alpha ); } -Magick::DrawableBase* Magick::DrawableStrokeOpacity::copy() const +Magick::DrawableBase* Magick::DrawableStrokeAlpha::copy() const { - return new DrawableStrokeOpacity(*this); + return new DrawableStrokeAlpha(*this); } // Stroke width diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 42a6f710f..18aea6f97 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -996,7 +996,7 @@ void Magick::Image::floodFillColor( const Geometry &point_, // Floodfill pixels matching color (within fuzz factor) of target // pixel(x,y) with replacement alpha value using method. -void Magick::Image::floodFillOpacity( const ssize_t x_, +void Magick::Image::floodFillAlpha( const ssize_t x_, const ssize_t y_, const unsigned int alpha_, const PaintMethod method_ ) @@ -1458,7 +1458,7 @@ void Magick::Image::oilPaint ( const double radius_, const double sigma_ ) void Magick::Image::alpha ( const unsigned int alpha_ ) { modifyImage(); - SetImageOpacity( image(), alpha_ ); + SetImageAlpha( image(), alpha_ ); } // Change the color of an opaque pixel to the pen color. @@ -3306,7 +3306,7 @@ void Magick::Image::matte ( const bool matteFlag_ ) // desired, then set the matte channel to opaque. if ((matteFlag_ && !constImage()->matte) || (constImage()->matte && !matteFlag_)) - SetImageOpacity(image(),OpaqueAlpha); + SetImageAlpha(image(),OpaqueAlpha); image()->matte = (MagickBooleanType) matteFlag_; } diff --git a/Magick++/lib/Magick++/Drawable.h b/Magick++/lib/Magick++/Drawable.h index 3e0ce0e90..6a864d245 100644 --- a/Magick++/lib/Magick++/Drawable.h +++ b/Magick++/lib/Magick++/Drawable.h @@ -897,15 +897,15 @@ private: }; // Specify drawing fill alpha -class MagickPPExport DrawableFillOpacity : public DrawableBase +class MagickPPExport DrawableFillAlpha : public DrawableBase { public: - DrawableFillOpacity ( double alpha_ ) + DrawableFillAlpha ( double alpha_ ) : _alpha(alpha_) { } - /*virtual*/ ~DrawableFillOpacity ( void ); + /*virtual*/ ~DrawableFillAlpha ( void ); // Operator to invoke equivalent draw API call /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; @@ -1808,15 +1808,15 @@ private: }; // Stroke alpha -class MagickPPExport DrawableStrokeOpacity : public DrawableBase +class MagickPPExport DrawableStrokeAlpha : public DrawableBase { public: - DrawableStrokeOpacity ( double alpha_ ) + DrawableStrokeAlpha ( double alpha_ ) : _alpha(alpha_) { } - /*virtual*/ ~DrawableStrokeOpacity ( void ); + /*virtual*/ ~DrawableStrokeAlpha ( void ); // Operator to invoke equivalent draw API call /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; diff --git a/Magick++/lib/Magick++/Image.h b/Magick++/lib/Magick++/Image.h index ac4dade10..72ab3680f 100644 --- a/Magick++/lib/Magick++/Image.h +++ b/Magick++/lib/Magick++/Image.h @@ -333,7 +333,7 @@ namespace Magick // Floodfill pixels matching color (within fuzz factor) of target // pixel(x,y) with replacement alpha value using method. - void floodFillOpacity ( const ::ssize_t x_, + void floodFillAlpha ( const ::ssize_t x_, const ::ssize_t y_, const unsigned int alpha_, const PaintMethod method_ ); diff --git a/Magick++/lib/Magick++/Include.h b/Magick++/lib/Magick++/Include.h index cc7fb9d84..8bbd9d205 100644 --- a/Magick++/lib/Magick++/Include.h +++ b/Magick++/lib/Magick++/Include.h @@ -153,7 +153,7 @@ namespace Magick using MagickCore::MagentaChannel; using MagickCore::BlueChannel; using MagickCore::YellowChannel; - using MagickCore::OpacityChannel; + using MagickCore::AlphaChannel; using MagickCore::BlackChannel; using MagickCore::DefaultChannels; using MagickCore::AllChannels; @@ -670,7 +670,7 @@ namespace Magick using MagickCore::DrawSetClipRule; using MagickCore::DrawSetClipUnits; using MagickCore::DrawSetFillColor; - using MagickCore::DrawSetFillOpacity; + using MagickCore::DrawSetFillAlpha; using MagickCore::DrawSetFillPatternURL; using MagickCore::DrawSetFillRule; using MagickCore::DrawSetFont; @@ -687,7 +687,7 @@ namespace Magick using MagickCore::DrawSetStrokeLineCap; using MagickCore::DrawSetStrokeLineJoin; using MagickCore::DrawSetStrokeMiterLimit; - using MagickCore::DrawSetStrokeOpacity; + using MagickCore::DrawSetStrokeAlpha; using MagickCore::DrawSetStrokePatternURL; using MagickCore::DrawSetStrokeWidth; using MagickCore::DrawSetTextAntialias; @@ -866,7 +866,7 @@ namespace Magick using MagickCore::SetImageExtent; using MagickCore::SetImageInfo; using MagickCore::SetImageInfoFile; - using MagickCore::SetImageOpacity; + using MagickCore::SetImageAlpha; using MagickCore::SetImageOption; using MagickCore::SetImageProfile; using MagickCore::SetImageProperty; diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 3408b66ee..e2f392438 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -4509,7 +4509,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image, (void) SetImageAlphaChannel(composite_image,OpaqueAlphaChannel, exception); if (draw_info->alpha != OpaqueAlpha) - (void) SetImageOpacity(composite_image,draw_info->alpha); + (void) SetImageAlpha(composite_image,draw_info->alpha); SetGeometry(image,&geometry); image->gravity=draw_info->gravity; geometry.x=x; diff --git a/MagickCore/image.c b/MagickCore/image.c index 349dcead1..b82e00955 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -2580,13 +2580,13 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image, } case OpaqueAlphaChannel: { - status=SetImageOpacity(image,OpaqueAlpha); + status=SetImageAlpha(image,OpaqueAlpha); image->matte=MagickTrue; break; } case TransparentAlphaChannel: { - status=SetImageOpacity(image,TransparentAlpha); + status=SetImageAlpha(image,TransparentAlpha); image->matte=MagickTrue; break; } @@ -2594,7 +2594,7 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image, { if (image->matte == MagickFalse) { - status=SetImageOpacity(image,OpaqueAlpha); + status=SetImageAlpha(image,OpaqueAlpha); image->matte=MagickTrue; } break; @@ -3376,28 +3376,27 @@ MagickExport MagickBooleanType SetImageMask(Image *image, % % % % % % -% S e t I m a g e O p a c i t y % +% S e t I m a g e A l p h a % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% SetImageOpacity() sets the opacity levels of the image. +% SetImageAlphs() sets the alpha levels of the image. % -% The format of the SetImageOpacity method is: +% The format of the SetImageAlpha method is: % -% MagickBooleanType SetImageOpacity(Image *image,const Quantum opacity) +% MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha) % % A description of each parameter follows: % % o image: the image. % -% o opacity: the level of transparency: 0 is fully opaque and QuantumRange is +% o Alpha: the level of transparency: 0 is fully opaque and QuantumRange is % fully transparent. % */ -MagickExport MagickBooleanType SetImageOpacity(Image *image, - const Quantum opacity) +MagickExport MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha) { CacheView *image_view; @@ -3415,7 +3414,7 @@ MagickExport MagickBooleanType SetImageOpacity(Image *image, if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(image->signature == MagickSignature); - image->matte=opacity != OpaqueAlpha ? MagickTrue : MagickFalse; + image->matte=alpha != OpaqueAlpha ? MagickTrue : MagickFalse; status=MagickTrue; exception=(&image->exception); image_view=AcquireCacheView(image); @@ -3440,7 +3439,7 @@ MagickExport MagickBooleanType SetImageOpacity(Image *image, } for (x=0; x < (ssize_t) image->columns; x++) { - SetPixelAlpha(image,opacity,q); + SetPixelAlpha(image,alpha,q); q+=GetPixelChannels(image); } if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse) diff --git a/MagickCore/image.h b/MagickCore/image.h index 2424ede14..07473dba2 100644 --- a/MagickCore/image.h +++ b/MagickCore/image.h @@ -530,6 +530,7 @@ extern MagickExport MagickBooleanType ModifyImage(Image **,ExceptionInfo *), ResetImagePage(Image *,const char *), SeparateImage(Image *), + SetImageAlpha(Image *,const Quantum), SetImageAlphaChannel(Image *,const AlphaChannelType,ExceptionInfo *), SetImageBackgroundColor(Image *), SetImageClipMask(Image *,const Image *,ExceptionInfo *), @@ -537,7 +538,6 @@ extern MagickExport MagickBooleanType SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *), SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *), SetImageMask(Image *,const Image *,ExceptionInfo *), - SetImageOpacity(Image *,const Quantum), SetImageStorageClass(Image *,const ClassType,ExceptionInfo *), SetImageType(Image *,const ImageType,ExceptionInfo *), StripImage(Image *), diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index df4049a78..6fe106710 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 @@ -429,15 +435,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 */ @@ -1160,7 +1166,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 @@ -1189,7 +1197,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 @@ -1201,7 +1211,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 */ @@ -1252,7 +1262,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 @@ -1307,7 +1319,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 @@ -1444,7 +1458,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 */ @@ -1453,7 +1469,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). */ @@ -1509,7 +1527,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/version.h b/MagickCore/version.h index b875ec400..fbaf35522 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 "5481" +#define MagickSVNRevision "exported" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 diff --git a/MagickWand/compare.c b/MagickWand/compare.c index 803a17a47..5e9d77801 100644 --- a/MagickWand/compare.c +++ b/MagickWand/compare.c @@ -1081,8 +1081,8 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, channel_distortion[BlueChannel]); if (image->matte != MagickFalse) (void) FormatLocaleFile(stderr," alpha: %g (%g)\n", - QuantumRange*channel_distortion[OpacityChannel], - channel_distortion[OpacityChannel]); + QuantumRange*channel_distortion[AlphaChannel], + channel_distortion[AlphaChannel]); break; } case CMYKColorspace: @@ -1101,8 +1101,8 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, channel_distortion[BlackChannel]); if (image->matte != MagickFalse) (void) FormatLocaleFile(stderr," alpha: %g (%g)\n", - QuantumRange*channel_distortion[OpacityChannel], - channel_distortion[OpacityChannel]); + QuantumRange*channel_distortion[AlphaChannel], + channel_distortion[AlphaChannel]); break; } case GRAYColorspace: @@ -1112,8 +1112,8 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, channel_distortion[GrayChannel]); if (image->matte != MagickFalse) (void) FormatLocaleFile(stderr," alpha: %g (%g)\n", - QuantumRange*channel_distortion[OpacityChannel], - channel_distortion[OpacityChannel]); + QuantumRange*channel_distortion[AlphaChannel], + channel_distortion[AlphaChannel]); break; } } @@ -1139,7 +1139,7 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, channel_distortion[BlueChannel]); if (image->matte != MagickFalse) (void) FormatLocaleFile(stderr," alpha: %g\n", - channel_distortion[OpacityChannel]); + channel_distortion[AlphaChannel]); break; } case CMYKColorspace: @@ -1154,7 +1154,7 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, channel_distortion[BlackChannel]); if (image->matte != MagickFalse) (void) FormatLocaleFile(stderr," alpha: %g\n", - channel_distortion[OpacityChannel]); + channel_distortion[AlphaChannel]); break; } case GRAYColorspace: @@ -1163,7 +1163,7 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, channel_distortion[GrayChannel]); if (image->matte != MagickFalse) (void) FormatLocaleFile(stderr," alpha: %g\n", - channel_distortion[OpacityChannel]); + channel_distortion[AlphaChannel]); break; } } diff --git a/MagickWand/drawing-wand.c b/MagickWand/drawing-wand.c index 550500aa7..9267695e2 100644 --- a/MagickWand/drawing-wand.c +++ b/MagickWand/drawing-wand.c @@ -1454,19 +1454,19 @@ WandExport void DrawGetFillColor(const DrawingWand *wand,PixelWand *fill_color) % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% DrawGetFillOpacity() returns the opacity used when drawing using the fill +% DrawGetFillAlpha() returns the alpha used when drawing using the fill % color or fill texture. Fully opaque is 1.0. % -% The format of the DrawGetFillOpacity method is: +% The format of the DrawGetFillAlpha method is: % -% double DrawGetFillOpacity(const DrawingWand *wand) +% double DrawGetFillAlpha(const DrawingWand *wand) % % A description of each parameter follows: % % o wand: the drawing wand. % */ -WandExport double DrawGetFillOpacity(const DrawingWand *wand) +WandExport double DrawGetFillAlpha(const DrawingWand *wand) { double alpha; @@ -1799,19 +1799,19 @@ WandExport GravityType DrawGetGravity(const DrawingWand *wand) % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% DrawGetOpacity() returns the opacity used when drawing with the fill +% DrawGetAlpha() returns the alpha used when drawing with the fill % or stroke color or texture. Fully opaque is 1.0. % -% The format of the DrawGetOpacity method is: +% The format of the DrawGetAlpha method is: % -% double DrawGetOpacity(const DrawingWand *wand) +% double DrawGetAlpha(const DrawingWand *wand) % % A description of each parameter follows: % % o wand: the drawing wand. % */ -WandExport double DrawGetOpacity(const DrawingWand *wand) +WandExport double DrawGetAlpha(const DrawingWand *wand) { double alpha; @@ -2108,18 +2108,18 @@ WandExport size_t DrawGetStrokeMiterLimit(const DrawingWand *wand) % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% DrawGetStrokeOpacity() returns the opacity of stroked object outlines. +% DrawGetStrokeAlpha() returns the alpha of stroked object outlines. % -% The format of the DrawGetStrokeOpacity method is: +% The format of the DrawGetStrokeAlpha method is: % -% double DrawGetStrokeOpacity(const DrawingWand *wand) +% double DrawGetStrokeAlpha(const DrawingWand *wand) % % A description of each parameter follows: % % o wand: the drawing wand. % */ -WandExport double DrawGetStrokeOpacity(const DrawingWand *wand) +WandExport double DrawGetStrokeAlpha(const DrawingWand *wand) { double alpha; @@ -2470,7 +2470,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand) GetColorTuple(&pixel,MagickTrue,value); (void) SetXMLTreeContent(child,value); } - child=AddChildToXMLTree(xml_info,"fill-opacity",0); + child=AddChildToXMLTree(xml_info,"fill-alpha",0); if (child != (XMLTreeInfo *) NULL) { (void) FormatLocaleString(value,MaxTextExtent,"%g", @@ -2591,7 +2591,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand) CurrentContext->miterlimit); (void) SetXMLTreeContent(child,value); } - child=AddChildToXMLTree(xml_info,"stroke-opacity",0); + child=AddChildToXMLTree(xml_info,"stroke-alpha",0); if (child != (XMLTreeInfo *) NULL) { (void) FormatLocaleString(value,MaxTextExtent,"%g", @@ -2686,7 +2686,7 @@ WandExport void DrawGetTextUnderColor(const DrawingWand *wand, %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DrawLine() draws a line on the image using the current stroke color, -% stroke opacity, and stroke width. +% stroke alpha, and stroke width. % % The format of the DrawLine method is: % @@ -2727,9 +2727,9 @@ WandExport void DrawLine(DrawingWand *wand,const double sx,const double sy, % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% DrawMatte() paints on the image's opacity channel in order to set effected +% DrawMatte() paints on the image's alpha channel in order to set effected % pixels to transparent. -% to influence the opacity of pixels. The available paint +% to influence the alpha of pixels. The available paint % methods are: % % PointMethod: Select the target pixel @@ -4712,35 +4712,35 @@ WandExport void DrawSetFillColor(DrawingWand *wand,const PixelWand *fill_wand) % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% DrawSetFillOpacity() sets the opacity to use when drawing using the fill +% DrawSetFillAlpha() sets the alpha to use when drawing using the fill % color or fill texture. Fully opaque is 1.0. % -% The format of the DrawSetFillOpacity method is: +% The format of the DrawSetFillAlpha method is: % -% void DrawSetFillOpacity(DrawingWand *wand,const double fill_opacity) +% void DrawSetFillAlpha(DrawingWand *wand,const double fill_alpha) % % A description of each parameter follows: % % o wand: the drawing wand. % -% o fill_opacity: fill opacity +% o fill_alpha: fill alpha % */ -WandExport void DrawSetFillOpacity(DrawingWand *wand,const double fill_opacity) +WandExport void DrawSetFillAlpha(DrawingWand *wand,const double fill_alpha) { Quantum - opacity; + alpha; assert(wand != (DrawingWand *) NULL); assert(wand->signature == WandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - opacity=ClampToQuantum((double) QuantumRange*(1.0-fill_opacity)); + alpha=ClampToQuantum((double) QuantumRange*(1.0-fill_alpha)); if ((wand->filter_off != MagickFalse) || - (CurrentContext->fill.alpha != opacity)) + (CurrentContext->fill.alpha != alpha)) { - CurrentContext->fill.alpha=opacity; - (void) MvgPrintf(wand,"fill-opacity %g\n",fill_opacity); + CurrentContext->fill.alpha=alpha; + (void) MvgPrintf(wand,"fill-alpha %g\n",fill_alpha); } } @@ -4798,35 +4798,35 @@ WandExport MagickBooleanType DrawSetFontResolution(DrawingWand *wand, % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% DrawSetOpacity() sets the opacity to use when drawing using the fill or +% DrawSetAlpha() sets the alpha to use when drawing using the fill or % stroke color or texture. Fully opaque is 1.0. % -% The format of the DrawSetOpacity method is: +% The format of the DrawSetAlpha method is: % -% void DrawSetOpacity(DrawingWand *wand,const double opacity) +% void DrawSetAlpha(DrawingWand *wand,const double alpha) % % A description of each parameter follows: % % o wand: the drawing wand. % -% o opacity: fill opacity +% o alpha: fill alpha % */ -WandExport void DrawSetOpacity(DrawingWand *wand,const double opacity) +WandExport void DrawSetAlpha(DrawingWand *wand,const double alpha) { Quantum - quantum_opacity; + quantum_alpha; assert(wand != (DrawingWand *) NULL); assert(wand->signature == WandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - quantum_opacity=ClampToQuantum((double) QuantumRange*(1.0-opacity)); + quantum_alpha=ClampToQuantum((double) QuantumRange*(1.0-alpha)); if ((wand->filter_off != MagickFalse) || - (CurrentContext->alpha != quantum_opacity)) + (CurrentContext->alpha != quantum_alpha)) { - CurrentContext->alpha=(Quantum) opacity; - (void) MvgPrintf(wand,"opacity %g\n",opacity); + CurrentContext->alpha=(Quantum) alpha; + (void) MvgPrintf(wand,"alpha %g\n",alpha); } } @@ -5678,36 +5678,36 @@ WandExport void DrawSetStrokeMiterLimit(DrawingWand *wand, % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% DrawSetStrokeOpacity() specifies the opacity of stroked object outlines. +% DrawSetStrokeAlpha() specifies the alpha of stroked object outlines. % -% The format of the DrawSetStrokeOpacity method is: +% The format of the DrawSetStrokeAlpha method is: % -% void DrawSetStrokeOpacity(DrawingWand *wand, -% const double stroke_opacity) +% void DrawSetStrokeAlpha(DrawingWand *wand, +% const double stroke_alpha) % % A description of each parameter follows: % % o wand: the drawing wand. % -% o stroke_opacity: stroke opacity. The value 1.0 is opaque. +% o stroke_alpha: stroke alpha. The value 1.0 is opaque. % */ -WandExport void DrawSetStrokeOpacity(DrawingWand *wand, - const double stroke_opacity) +WandExport void DrawSetStrokeAlpha(DrawingWand *wand, + const double stroke_alpha) { Quantum - opacity; + alpha; assert(wand != (DrawingWand *) NULL); assert(wand->signature == WandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - opacity=ClampToQuantum((double) QuantumRange*(1.0-stroke_opacity)); + alpha=ClampToQuantum((double) QuantumRange*(1.0-stroke_alpha)); if ((wand->filter_off != MagickFalse) || - (CurrentContext->stroke.alpha != opacity)) + (CurrentContext->stroke.alpha != alpha)) { - CurrentContext->stroke.alpha=opacity; - (void) MvgPrintf(wand,"stroke-opacity %g\n",stroke_opacity); + CurrentContext->stroke.alpha=alpha; + (void) MvgPrintf(wand,"stroke-alpha %g\n",stroke_alpha); } } @@ -6184,7 +6184,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand, (void) QueryColorCompliance(value,AllCompliance,&CurrentContext->fill, wand->exception); } - child=GetXMLTreeChild(xml_info,"fill-opacity"); + child=GetXMLTreeChild(xml_info,"fill-alpha"); if (child != (XMLTreeInfo *) NULL) { value=GetXMLTreeContent(child); @@ -6348,7 +6348,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand, if (value != (const char *) NULL) CurrentContext->miterlimit=StringToUnsignedLong(value); } - child=GetXMLTreeChild(xml_info,"stroke-opacity"); + child=GetXMLTreeChild(xml_info,"stroke-alpha"); if (child != (XMLTreeInfo *) NULL) { value=GetXMLTreeContent(child); diff --git a/MagickWand/drawing-wand.h b/MagickWand/drawing-wand.h index 3d714aacd..e2debde56 100644 --- a/MagickWand/drawing-wand.h +++ b/MagickWand/drawing-wand.h @@ -45,12 +45,12 @@ extern WandExport DecorationType DrawGetTextDecoration(const DrawingWand *); extern WandExport double - DrawGetFillOpacity(const DrawingWand *), + DrawGetFillAlpha(const DrawingWand *), DrawGetFontSize(const DrawingWand *), - DrawGetOpacity(const DrawingWand *), + DrawGetAlpha(const DrawingWand *), *DrawGetStrokeDashArray(const DrawingWand *,size_t *), DrawGetStrokeDashOffset(const DrawingWand *), - DrawGetStrokeOpacity(const DrawingWand *), + DrawGetStrokeAlpha(const DrawingWand *), DrawGetStrokeWidth(const DrawingWand *), DrawGetTextKerning(DrawingWand *), DrawGetTextInterlineSpacing(DrawingWand *), @@ -185,21 +185,21 @@ extern WandExport void DrawSetClipRule(DrawingWand *,const FillRule), DrawSetClipUnits(DrawingWand *,const ClipPathUnits), DrawSetFillColor(DrawingWand *,const PixelWand *), - DrawSetFillOpacity(DrawingWand *,const double), + DrawSetFillAlpha(DrawingWand *,const double), DrawSetFillRule(DrawingWand *,const FillRule), DrawSetFontSize(DrawingWand *,const double), DrawSetFontStretch(DrawingWand *,const StretchType), DrawSetFontStyle(DrawingWand *,const StyleType), DrawSetFontWeight(DrawingWand *,const size_t), DrawSetGravity(DrawingWand *,const GravityType), - DrawSetOpacity(DrawingWand *,const double), + DrawSetAlpha(DrawingWand *,const double), DrawSetStrokeAntialias(DrawingWand *,const MagickBooleanType), DrawSetStrokeColor(DrawingWand *,const PixelWand *), DrawSetStrokeDashOffset(DrawingWand *,const double dashoffset), DrawSetStrokeLineCap(DrawingWand *,const LineCap), DrawSetStrokeLineJoin(DrawingWand *,const LineJoin), DrawSetStrokeMiterLimit(DrawingWand *,const size_t), - DrawSetStrokeOpacity(DrawingWand *, const double), + DrawSetStrokeAlpha(DrawingWand *, const double), DrawSetStrokeWidth(DrawingWand *,const double), DrawSetTextAlignment(DrawingWand *,const AlignType), DrawSetTextAntialias(DrawingWand *,const MagickBooleanType), diff --git a/MagickWand/drawtest.c b/MagickWand/drawtest.c index 2596d814c..27f79e5f5 100644 --- a/MagickWand/drawtest.c +++ b/MagickWand/drawtest.c @@ -83,7 +83,7 @@ static MagickBooleanType ScribbleImage (MagickWand *canvas) (void) PixelSetColor(color,"#ffffff"); DrawSetFillColor(picasso,color); DrawRectangle(picasso,23.69,22.97,564.6,802.2); - DrawSetFillOpacity(picasso,1.0); + DrawSetFillAlpha(picasso,1.0); (void) PixelSetColor(color,"none"); DrawSetFillColor(picasso,color); DrawSetStrokeColor(picasso,color); diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index 8cae5c370..afdc4df5e 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -822,7 +822,7 @@ WandExport MagickBooleanType MagickBlackThresholdImage(MagickWand *wand, (void) FormatLocaleString(thresholds,MaxTextExtent, QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat, PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold), - PixelGetBlueQuantum(threshold),PixelGetOpacityQuantum(threshold)); + PixelGetBlueQuantum(threshold),PixelGetAlphaQuantum(threshold)); status=BlackThresholdImage(wand->images,thresholds,&wand->images->exception); if (status == MagickFalse) InheritException(wand->exception,&wand->images->exception); @@ -1434,7 +1434,7 @@ WandExport MagickBooleanType MagickColorDecisionListImage(MagickWand *wand, % The format of the MagickColorizeImage method is: % % MagickBooleanType MagickColorizeImage(MagickWand *wand, -% const PixelWand *colorize,const PixelWand *opacity) +% const PixelWand *colorize,const PixelWand *alpha) % % A description of each parameter follows: % @@ -1442,11 +1442,11 @@ WandExport MagickBooleanType MagickColorDecisionListImage(MagickWand *wand, % % o colorize: the colorize pixel wand. % -% o opacity: the opacity pixel wand. +% o alpha: the alpha pixel wand. % */ WandExport MagickBooleanType MagickColorizeImage(MagickWand *wand, - const PixelWand *colorize,const PixelWand *opacity) + const PixelWand *colorize,const PixelWand *alpha) { char percent_opaque[MaxTextExtent]; @@ -1465,10 +1465,10 @@ WandExport MagickBooleanType MagickColorizeImage(MagickWand *wand, ThrowWandException(WandError,"ContainsNoImages",wand->name); (void) FormatLocaleString(percent_opaque,MaxTextExtent, "%g,%g,%g,%g",(double) (100.0*QuantumScale* - PixelGetRedQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetGreenQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetBlueQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetOpacityQuantum(opacity))); + PixelGetRedQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetGreenQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetBlueQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetAlphaQuantum(alpha))); PixelGetQuantumPacket(colorize,&target); colorize_image=ColorizeImage(wand->images,percent_opaque,target, wand->exception); @@ -2049,7 +2049,7 @@ WandExport MagickBooleanType MagickCycleColormapImage(MagickWand *wand, % % o map: This string reflects the expected ordering of the pixel array. % It can be any combination or order of R = red, G = green, B = blue, -% A = alpha (0 is transparent), O = opacity (0 is opaque), C = cyan, +% A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan, % Y = yellow, M = magenta, K = black, I = intensity (for grayscale), % P = pad. % @@ -2822,7 +2822,7 @@ WandExport MagickBooleanType MagickEvaluateImage(MagickWand *wand, % % o map: This string reflects the expected ordering of the pixel array. % It can be any combination or order of R = red, G = green, B = blue, -% A = alpha (0 is transparent), O = opacity (0 is opaque), C = cyan, +% A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan, % Y = yellow, M = magenta, K = black, I = intensity (for grayscale), % P = pad. % @@ -5862,7 +5862,7 @@ WandExport MagickBooleanType MagickImplodeImage(MagickWand *wand, % % o map: This string reflects the expected ordering of the pixel array. % It can be any combination or order of R = red, G = green, B = blue, -% A = alpha (0 is transparent), O = opacity (0 is opaque), C = cyan, +% A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan, % Y = yellow, M = magenta, K = black, I = intensity (for grayscale), % P = pad. % @@ -9549,7 +9549,7 @@ WandExport MagickBooleanType MagickSetImageMatte(MagickWand *wand, if (wand->images == (Image *) NULL) ThrowWandException(WandError,"ContainsNoImages",wand->name); if ((wand->images->matte == MagickFalse) && (matte != MagickFalse)) - (void) SetImageOpacity(wand->images,OpaqueAlpha); + (void) SetImageAlpha(wand->images,OpaqueAlpha); wand->images->matte=matte; return(MagickTrue); } @@ -9603,11 +9603,11 @@ WandExport MagickBooleanType MagickSetImageMatteColor(MagickWand *wand, % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% MagickSetImageOpacity() sets the image to the specified opacity level. +% MagickSetImageAlpha() sets the image to the specified alpha level. % -% The format of the MagickSetImageOpacity method is: +% The format of the MagickSetImageAlpha method is: % -% MagickBooleanType MagickSetImageOpacity(MagickWand *wand, +% MagickBooleanType MagickSetImageAlpha(MagickWand *wand, % const double alpha) % % A description of each parameter follows: @@ -9618,7 +9618,7 @@ WandExport MagickBooleanType MagickSetImageMatteColor(MagickWand *wand, % transparent. % */ -WandExport MagickBooleanType MagickSetImageOpacity(MagickWand *wand, +WandExport MagickBooleanType MagickSetImageAlpha(MagickWand *wand, const double alpha) { MagickBooleanType @@ -9630,7 +9630,7 @@ WandExport MagickBooleanType MagickSetImageOpacity(MagickWand *wand, (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if (wand->images == (Image *) NULL) ThrowWandException(WandError,"ContainsNoImages",wand->name); - status=SetImageOpacity(wand->images,ClampToQuantum(QuantumRange*alpha)); + status=SetImageAlpha(wand->images,ClampToQuantum(QuantumRange*alpha)); if (status == MagickFalse) InheritException(wand->exception,&wand->images->exception); return(status); @@ -10203,13 +10203,13 @@ WandExport MagickBooleanType MagickShadeImage(MagickWand *wand, % The format of the MagickShadowImage method is: % % MagickBooleanType MagickShadowImage(MagickWand *wand, -% const double opacity,const double sigma,const ssize_t x,const ssize_t y) +% const double alpha,const double sigma,const ssize_t x,const ssize_t y) % % A description of each parameter follows: % % o wand: the magick wand. % -% o opacity: percentage transparency. +% o alpha: percentage transparency. % % o sigma: the standard deviation of the Gaussian, in pixels. % @@ -10219,7 +10219,7 @@ WandExport MagickBooleanType MagickShadeImage(MagickWand *wand, % */ WandExport MagickBooleanType MagickShadowImage(MagickWand *wand, - const double opacity,const double sigma,const ssize_t x,const ssize_t y) + const double alpha,const double sigma,const ssize_t x,const ssize_t y) { Image *shadow_image; @@ -10230,7 +10230,7 @@ WandExport MagickBooleanType MagickShadowImage(MagickWand *wand, (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if (wand->images == (Image *) NULL) ThrowWandException(WandError,"ContainsNoImages",wand->name); - shadow_image=ShadowImage(wand->images,opacity,sigma,x,y,wand->exception); + shadow_image=ShadowImage(wand->images,alpha,sigma,x,y,wand->exception); if (shadow_image == (Image *) NULL) return(MagickFalse); ReplaceImageInList(&wand->images,shadow_image); @@ -11263,7 +11263,7 @@ WandExport MagickBooleanType MagickThumbnailImage(MagickWand *wand, % The format of the MagickTintImage method is: % % MagickBooleanType MagickTintImage(MagickWand *wand, -% const PixelWand *tint,const PixelWand *opacity) +% const PixelWand *tint,const PixelWand *alpha) % % A description of each parameter follows: % @@ -11271,11 +11271,11 @@ WandExport MagickBooleanType MagickThumbnailImage(MagickWand *wand, % % o tint: the tint pixel wand. % -% o opacity: the opacity pixel wand. +% o alpha: the alpha pixel wand. % */ WandExport MagickBooleanType MagickTintImage(MagickWand *wand, - const PixelWand *tint,const PixelWand *opacity) + const PixelWand *tint,const PixelWand *alpha) { char percent_opaque[MaxTextExtent]; @@ -11295,18 +11295,18 @@ WandExport MagickBooleanType MagickTintImage(MagickWand *wand, if (wand->images->colorspace != CMYKColorspace) (void) FormatLocaleString(percent_opaque,MaxTextExtent, "%g,%g,%g,%g",(double) (100.0*QuantumScale* - PixelGetRedQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetGreenQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetBlueQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetOpacityQuantum(opacity))); + PixelGetRedQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetGreenQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetBlueQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetAlphaQuantum(alpha))); else (void) FormatLocaleString(percent_opaque,MaxTextExtent, "%g,%g,%g,%g,%g",(double) (100.0*QuantumScale* - PixelGetCyanQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetMagentaQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetYellowQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetBlackQuantum(opacity)),(double) (100.0*QuantumScale* - PixelGetOpacityQuantum(opacity))); + PixelGetCyanQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetMagentaQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetYellowQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetBlackQuantum(alpha)),(double) (100.0*QuantumScale* + PixelGetAlphaQuantum(alpha))); target=PixelGetPixel(tint); tint_image=TintImage(wand->images,percent_opaque,&target,wand->exception); if (tint_image == (Image *) NULL) @@ -11440,7 +11440,7 @@ WandExport MagickBooleanType MagickTransformImageColorspace(MagickWand *wand, % % o wand: the magick wand. % -% o target: Change this target color to specified opacity value within +% o target: Change this target color to specified alpha value within % the image. % % o alpha: the level of transparency: 1.0 is fully opaque and 0.0 is fully @@ -11854,7 +11854,7 @@ WandExport MagickBooleanType MagickWhiteThresholdImage(MagickWand *wand, (void) FormatLocaleString(thresholds,MaxTextExtent, QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat, PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold), - PixelGetBlueQuantum(threshold),PixelGetOpacityQuantum(threshold)); + PixelGetBlueQuantum(threshold),PixelGetAlphaQuantum(threshold)); status=WhiteThresholdImage(wand->images,thresholds,&wand->images->exception); if (status == MagickFalse) InheritException(wand->exception,&wand->images->exception); diff --git a/MagickWand/magick-image.h b/MagickWand/magick-image.h index 0474d2400..06fb6c40f 100644 --- a/MagickWand/magick-image.h +++ b/MagickWand/magick-image.h @@ -260,7 +260,7 @@ extern WandExport MagickBooleanType MagickSetImageIterations(MagickWand *,const size_t), MagickSetImageMatte(MagickWand *,const MagickBooleanType), MagickSetImageMatteColor(MagickWand *,const PixelWand *), - MagickSetImageOpacity(MagickWand *,const double), + MagickSetImageAlpha(MagickWand *,const double), MagickSetImageOrientation(MagickWand *,const OrientationType), MagickSetImagePage(MagickWand *,const size_t,const size_t,const ssize_t, const ssize_t), diff --git a/MagickWand/pixel-wand.c b/MagickWand/pixel-wand.c index f16e899e6..a3e676bb8 100644 --- a/MagickWand/pixel-wand.c +++ b/MagickWand/pixel-wand.c @@ -1205,68 +1205,6 @@ WandExport void PixelGetMagickColor(const PixelWand *wand, % % % % % % -% P i x e l G e t O p a c i t y % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% PixelGetOpacity() returns the normalized opacity color of the pixel wand. -% -% The format of the PixelGetOpacity method is: -% -% double PixelGetOpacity(const PixelWand *wand) -% -% A description of each parameter follows: -% -% o wand: the pixel wand. -% -*/ -WandExport double PixelGetOpacity(const PixelWand *wand) -{ - assert(wand != (const PixelWand *) NULL); - assert(wand->signature == WandSignature); - if (wand->debug != MagickFalse) - (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - return((double) QuantumScale*wand->pixel.alpha); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -% P i x e l G e t O p a c i t y Q u a n t u m % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% PixelGetOpacityQuantum() returns the opacity color of the pixel wand. -% -% The format of the PixelGetOpacityQuantum method is: -% -% Quantum PixelGetOpacityQuantum(const PixelWand *wand) -% -% A description of each parameter follows: -% -% o wand: the pixel wand. -% -*/ -WandExport Quantum PixelGetOpacityQuantum(const PixelWand *wand) -{ - assert(wand != (const PixelWand *) NULL); - assert(wand->signature == WandSignature); - if (wand->debug != MagickFalse) - (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - return(ClampToQuantum(wand->pixel.alpha)); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % % P i x e l G e t P i x e l % % % % % @@ -1571,22 +1509,22 @@ WandExport void PixelSetAlpha(PixelWand *wand,const double alpha) % The format of the PixelSetAlphaQuantum method is: % % void PixelSetAlphaQuantum(PixelWand *wand, -% const Quantum opacity) +% const Quantum alpha) % % A description of each parameter follows: % % o wand: the pixel wand. % -% o opacity: the opacity color. +% o alpha: the alpha color. % */ -WandExport void PixelSetAlphaQuantum(PixelWand *wand,const Quantum opacity) +WandExport void PixelSetAlphaQuantum(PixelWand *wand,const Quantum alpha) { assert(wand != (const PixelWand *) NULL); assert(wand->signature == WandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - wand->pixel.alpha=(MagickRealType) opacity; + wand->pixel.alpha=(MagickRealType) alpha; } /* @@ -2185,75 +2123,6 @@ WandExport void PixelSetPixelInfo(PixelWand *wand, % % % % % % -% P i x e l S e t O p a c i t y % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% PixelSetOpacity() sets the normalized opacity color of the pixel wand. -% -% The format of the PixelSetOpacity method is: -% -% void PixelSetOpacity(PixelWand *wand,const double opacity) -% -% A description of each parameter follows: -% -% o wand: the pixel wand. -% -% o opacity: the opacity color. -% -*/ -WandExport void PixelSetOpacity(PixelWand *wand,const double opacity) -{ - assert(wand != (const PixelWand *) NULL); - assert(wand->signature == WandSignature); - if (wand->debug != MagickFalse) - (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - wand->pixel.matte=MagickTrue; - wand->pixel.alpha=(MagickRealType) ClampToQuantum((MagickRealType) - QuantumRange*opacity); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -% P i x e l S e t O p a c i t y Q u a n t u m % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% PixelSetOpacityQuantum() sets the opacity color of the pixel wand. -% -% The format of the PixelSetOpacityQuantum method is: -% -% void PixelSetOpacityQuantum(PixelWand *wand, -% const Quantum opacity) -% -% A description of each parameter follows: -% -% o wand: the pixel wand. -% -% o opacity: the opacity color. -% -*/ -WandExport void PixelSetOpacityQuantum(PixelWand *wand,const Quantum opacity) -{ - assert(wand != (const PixelWand *) NULL); - assert(wand->signature == WandSignature); - if (wand->debug != MagickFalse) - (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - wand->pixel.alpha=(MagickRealType) opacity; -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % % P i x e l S e t Q u a n t u m P a c k e t % % % % % diff --git a/MagickWand/pixel-wand.h b/MagickWand/pixel-wand.h index bee5351d0..22d7b62b0 100644 --- a/MagickWand/pixel-wand.h +++ b/MagickWand/pixel-wand.h @@ -38,7 +38,7 @@ extern WandExport double PixelGetFuzz(const PixelWand *), PixelGetGreen(const PixelWand *), PixelGetMagenta(const PixelWand *), - PixelGetOpacity(const PixelWand *), + PixelGetAlpha(const PixelWand *), PixelGetRed(const PixelWand *), PixelGetYellow(const PixelWand *); @@ -70,7 +70,7 @@ extern WandExport Quantum PixelGetGreenQuantum(const PixelWand *), PixelGetIndex(const PixelWand *), PixelGetMagentaQuantum(const PixelWand *), - PixelGetOpacityQuantum(const PixelWand *), + PixelGetAlphaQuantum(const PixelWand *), PixelGetRedQuantum(const PixelWand *), PixelGetYellowQuantum(const PixelWand *); @@ -101,8 +101,8 @@ extern WandExport void PixelSetMagenta(PixelWand *,const double), PixelSetMagentaQuantum(PixelWand *,const Quantum), PixelSetPixelInfo(PixelWand *,const PixelInfo *), - PixelSetOpacity(PixelWand *,const double), - PixelSetOpacityQuantum(PixelWand *,const Quantum), + PixelSetAlpha(PixelWand *,const double), + PixelSetAlphaQuantum(PixelWand *,const Quantum), PixelSetQuantumPacket(PixelWand *,const PixelPacket *), PixelSetQuantumPixel(const Image *,const Quantum *,PixelWand *), PixelSetRed(PixelWand *,const double), diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index 13aad0177..a726e1d55 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -8239,7 +8239,7 @@ Mogrify(ref,...) if (attribute_flag[6] != 0) /* opacity */ { if (compose != DissolveCompositeOp) - (void) SetImageOpacity(composite_image,(Quantum) + (void) SetImageAlpha(composite_image,(Quantum) SiPrefixToDouble(argument_list[6].string_reference, QuantumRange)); else @@ -8271,7 +8271,7 @@ Mogrify(ref,...) opacity=(Quantum) SiPrefixToDouble( argument_list[6].string_reference,QuantumRange); if (composite_image->matte != MagickTrue) - (void) SetImageOpacity(composite_image,OpaqueAlpha); + (void) SetImageAlpha(composite_image,OpaqueAlpha); composite_view=AcquireCacheView(composite_image); for (y=0; y < (ssize_t) composite_image->rows ; y++) { @@ -8753,7 +8753,7 @@ Mogrify(ref,...) if (attribute_flag[2] != 0) geometry.y=argument_list[2].integer_reference; if (image->matte == MagickFalse) - (void) SetImageOpacity(image,OpaqueAlpha); + (void) SetImageAlpha(image,OpaqueAlpha); (void) GetOneVirtualMagickPixel(image,geometry.x,geometry.y,&target, exception); if (attribute_flag[4] != 0) diff --git a/coders/gradient.c b/coders/gradient.c index 8e71e338b..8cd14f68b 100644 --- a/coders/gradient.c +++ b/coders/gradient.c @@ -117,7 +117,7 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info, image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); - (void) SetImageOpacity(image,(Quantum) TransparentAlpha); + (void) SetImageAlpha(image,(Quantum) TransparentAlpha); (void) CopyMagickString(image->filename,image_info->filename,MaxTextExtent); (void) CopyMagickString(colorname,image_info->filename,MaxTextExtent); (void) sscanf(image_info->filename,"%[^-]",colorname); diff --git a/coders/msl.c b/coders/msl.c index f7f9a1466..6c43ab917 100644 --- a/coders/msl.c +++ b/coders/msl.c @@ -1950,14 +1950,14 @@ static void MSLStartElement(void *context,const xmlChar *tag, opacity=StringToLong(value); if (compose != DissolveCompositeOp) { - (void) SetImageOpacity(composite_image,(Quantum) + (void) SetImageAlpha(composite_image,(Quantum) opacity); break; } (void) SetImageArtifact(msl_info->image[n], "compose:args",value); if (composite_image->matte != MagickTrue) - (void) SetImageOpacity(composite_image,OpaqueAlpha); + (void) SetImageAlpha(composite_image,OpaqueAlpha); composite_view=AcquireCacheView(composite_image); for (y=0; y < (ssize_t) composite_image->rows ; y++) { @@ -6101,7 +6101,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, opac = (int)(QuantumRange * ((float)opac/100)); } else opac = StringToLong( value ); - (void) SetImageOpacity( msl_info->image[n], (Quantum) opac ); + (void) SetImageAlpha( msl_info->image[n], (Quantum) opac ); break; } (void) SetMSLAttributes(msl_info,keyword,value); diff --git a/coders/png.c b/coders/png.c index 8b162679c..d7d244151 100644 --- a/coders/png.c +++ b/coders/png.c @@ -10061,7 +10061,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, { /* Add an opaque matte channel */ image->matte = MagickTrue; - (void) SetImageOpacity(image,0); + (void) SetImageAlpha(image,OpaqueAlpha); if (logging != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), -- 2.40.0