Renamed mattecolor to alpha-color.
diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp
index 16bd898..ab47cbc 100644
--- a/Magick++/lib/Image.cpp
+++ b/Magick++/lib/Image.cpp
@@ -327,21 +327,21 @@
if (alphaColor_.isValid())
{
- image()->matte_color=alphaColor_;
- options()->matteColor(alphaColor_);
+ image()->alpha_color=alphaColor_;
+ options()->alphaColor(alphaColor_);
}
else
{
// Set to default matte color
Color tmpColor("#BDBDBD");
- image()->matte_color=tmpColor;
- options()->matteColor(tmpColor);
+ image()->alpha_color=tmpColor;
+ options()->alphaColor(tmpColor);
}
}
Magick::Color Magick::Image::alphaColor(void) const
{
- return(Color(constImage()->matte_color));
+ return(Color(constImage()->alpha_color));
}
void Magick::Image::animationDelay(const size_t delay_)
diff --git a/Magick++/lib/Magick++/Montage.h b/Magick++/lib/Magick++/Montage.h
index ae53d38..3b604b8 100644
--- a/Magick++/lib/Magick++/Montage.h
+++ b/Magick++/lib/Magick++/Montage.h
@@ -120,6 +120,10 @@
MontageFramed(void);
~MontageFramed(void);
+ // Frame foreground color
+ void alphaColor(const Color &alphaColor_);
+ Color alphaColor(void) const;
+
// Frame border color
void borderColor(const Color &borderColor_);
Color borderColor(void) const;
@@ -132,10 +136,6 @@
void frameGeometry(const Geometry &frame_);
Geometry frameGeometry(void) const;
- // Frame foreground color
- void matteColor(const Color &matteColor_);
- Color matteColor(void) const;
-
//
// Implementation methods/members
//
@@ -145,10 +145,10 @@
private:
+ Color _alphaColor;
Color _borderColor;
size_t _borderWidth;
Geometry _frame;
- Color _matteColor;
};
} // namespace Magick
diff --git a/Magick++/lib/Magick++/Options.h b/Magick++/lib/Magick++/Options.h
index e96cddb..d6d729d 100644
--- a/Magick++/lib/Magick++/Options.h
+++ b/Magick++/lib/Magick++/Options.h
@@ -42,6 +42,10 @@
void adjoin(bool flag_);
bool adjoin(void) const;
+ // Transparent color
+ void alphaColor(const Color &alphaColor_);
+ Color alphaColor(void) const;
+
// Image background color
void backgroundColor(const Color &color_);
Color backgroundColor(void) const;
@@ -139,10 +143,6 @@
void magick(const std::string &magick_);
std::string magick(void) const;
- // Transparent color
- void matteColor(const Color &matteColor_);
- Color matteColor(void) const;
-
// Write as a monochrome image
void monochrome(bool monochromeFlag_);
bool monochrome(void) const;
diff --git a/Magick++/lib/Montage.cpp b/Magick++/lib/Montage.cpp
index e6b5d23..4446ef5 100644
--- a/Magick++/lib/Montage.cpp
+++ b/Magick++/lib/Montage.cpp
@@ -181,6 +181,8 @@
{
(void) MagickCore::ResetMagickMemory(&montageInfo_,0,sizeof(montageInfo_));
+ // alpha_color
+ montageInfo_.alpha_color=Color();
// background_color
montageInfo_.background_color=_backgroundColor;
// border_color
@@ -203,8 +205,6 @@
Magick::CloneString(&montageInfo_.geometry,_geometry);
// gravity
montageInfo_.gravity=_gravity;
- // matte_color
- montageInfo_.matte_color=Color();
// pointsize
montageInfo_.pointsize=_pointSize;
// shadow
@@ -233,7 +233,7 @@
: _borderColor("#dfdfdf"),
_borderWidth(0),
_frame(),
- _matteColor("#bdbdbd")
+ _alphaColor("#bdbdbd")
{
}
@@ -241,6 +241,16 @@
{
}
+void Magick::MontageFramed::alphaColor(const Magick::Color &alphaColor_)
+{
+ _alphaColor=alphaColor_;
+}
+
+Magick::Color Magick::MontageFramed::alphaColor(void) const
+{
+ return(_alphaColor);
+}
+
void Magick::MontageFramed::borderColor(const Magick::Color &borderColor_)
{
_borderColor=borderColor_;
@@ -271,21 +281,13 @@
return(_frame);
}
-void Magick::MontageFramed::matteColor(const Magick::Color &matteColor_)
-{
- _matteColor=matteColor_;
-}
-
-Magick::Color Magick::MontageFramed::matteColor(void) const
-{
- return(_matteColor);
-}
-
void Magick::MontageFramed::updateMontageInfo(MontageInfo &montageInfo_) const
{
// Do base updates
Montage::updateMontageInfo(montageInfo_);
+ // alpha_color
+ montageInfo_.alpha_color = _alphaColor;
// border_color
montageInfo_.border_color=_borderColor;
// border_width
@@ -293,6 +295,4 @@
// frame
if (_frame.isValid())
Magick::CloneString(&montageInfo_.frame,_frame);
- // matte_color
- montageInfo_.matte_color=_matteColor;
}
diff --git a/Magick++/lib/Options.cpp b/Magick++/lib/Options.cpp
index c439992..9acd733 100644
--- a/Magick++/lib/Options.cpp
+++ b/Magick++/lib/Options.cpp
@@ -73,6 +73,16 @@
return(static_cast<bool>(_imageInfo->adjoin));
}
+void Magick::Options::alphaColor(const Color &alphaColor_)
+{
+ _imageInfo->alpha_color=alphaColor_;
+}
+
+Magick::Color Magick::Options::alphaColor(void) const
+{
+ return(Magick::Color(_imageInfo->alpha_color));
+}
+
void Magick::Options::backgroundColor(const Color &color_)
{
_imageInfo->background_color=color_;
@@ -398,16 +408,6 @@
return(std::string());
}
-void Magick::Options::matteColor(const Color &matteColor_)
-{
- _imageInfo->matte_color=matteColor_;
-}
-
-Magick::Color Magick::Options::matteColor(void) const
-{
- return(Magick::Color(_imageInfo->matte_color));
-}
-
void Magick::Options::monochrome(bool monochromeFlag_)
{
_imageInfo->monochrome=(MagickBooleanType) monochromeFlag_;
diff --git a/MagickCore/decorate.c b/MagickCore/decorate.c
index 0074c9c..a0ccca8 100644
--- a/MagickCore/decorate.c
+++ b/MagickCore/decorate.c
@@ -125,11 +125,11 @@
clone_image=CloneImage(image,0,0,MagickTrue,exception);
if (clone_image == (Image *) NULL)
return((Image *) NULL);
- clone_image->matte_color=image->border_color;
+ clone_image->alpha_color=image->border_color;
border_image=FrameImage(clone_image,&frame_info,compose,exception);
clone_image=DestroyImage(clone_image);
if (border_image != (Image *) NULL)
- border_image->matte_color=image->matte_color;
+ border_image->alpha_color=image->alpha_color;
return(border_image);
}
@@ -145,7 +145,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FrameImage() adds a simulated three-dimensional border around the image.
-% The color of the border is defined by the matte_color member of image.
+% The color of the border is defined by the alpha_color member of image.
% Members width and height of frame_info specify the border width of the
% vertical and horizontal sides of the frame. Members inner and outer
% indicate the width of the inner and outer shadows of the frame.
@@ -232,7 +232,7 @@
if ((IsPixelInfoGray(&frame_image->border_color) == MagickFalse) &&
(IsGrayColorspace(frame_image->colorspace) != MagickFalse))
(void) SetImageColorspace(frame_image,sRGBColorspace,exception);
- if ((frame_image->matte_color.alpha_trait != UndefinedPixelTrait) &&
+ if ((frame_image->alpha_color.alpha_trait != UndefinedPixelTrait) &&
(frame_image->alpha_trait == UndefinedPixelTrait))
(void) SetImageAlpha(frame_image,OpaqueAlpha,exception);
frame_image->page=image->page;
@@ -244,7 +244,7 @@
/*
Initialize 3D effects color.
*/
- matte=image->matte_color;
+ matte=image->alpha_color;
accentuate=matte;
accentuate.red=(double) (QuantumScale*((QuantumRange-
AccentuateModulate)*matte.red+(QuantumRange*AccentuateModulate)));
diff --git a/MagickCore/display.c b/MagickCore/display.c
index b54af63..8d372fe 100644
--- a/MagickCore/display.c
+++ b/MagickCore/display.c
@@ -8916,7 +8916,7 @@
exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) QueryColorCompliance(color,AllCompliance,&(*image)->matte_color,
+ (void) QueryColorCompliance(color,AllCompliance,&(*image)->alpha_color,
exception);
(void) ParsePageGeometry(*image,geometry,&page_geometry,
exception);
diff --git a/MagickCore/distort.c b/MagickCore/distort.c
index fef2f32..36598df 100644
--- a/MagickCore/distort.c
+++ b/MagickCore/distort.c
@@ -2368,13 +2368,13 @@
}
/* Initialize default pixel validity
- * negative: pixel is invalid output 'matte_color'
+ * negative: pixel is invalid output 'alpha_color'
* 0.0 to 1.0: antialiased, mix with resample output
* 1.0 or greater: use resampled output.
*/
validity = 1.0;
- ConformPixelInfo(distort_image,&distort_image->matte_color,&invalid,
+ ConformPixelInfo(distort_image,&distort_image->alpha_color,&invalid,
exception);
for (i=0; i < (ssize_t) distort_image->columns; i++)
{
diff --git a/MagickCore/effect.c b/MagickCore/effect.c
index 14d493f..cb7ea74 100644
--- a/MagickCore/effect.c
+++ b/MagickCore/effect.c
@@ -2297,7 +2297,7 @@
if (i == (NumberTiles/2))
{
(void) QueryColorCompliance("#dfdfdf",AllCompliance,
- &thumbnail->matte_color,exception);
+ &thumbnail->alpha_color,exception);
AppendImageToList(&images,thumbnail);
continue;
}
diff --git a/MagickCore/identify.c b/MagickCore/identify.c
index 2afc994..6e7c888 100644
--- a/MagickCore/identify.c
+++ b/MagickCore/identify.c
@@ -1070,15 +1070,15 @@
(void) FormatLocaleFile(file," Tile geometry: %.20gx%.20g%+.20g%+.20g\n",
(double) image->extract_info.width,(double) image->extract_info.height,
(double) image->extract_info.x,(double) image->extract_info.y);
+ (void) QueryColorname(image,&image->alpha_color,SVGCompliance,color,
+ exception);
+ (void) FormatLocaleFile(file," Alpha color: %s\n",color);
(void) QueryColorname(image,&image->background_color,SVGCompliance,color,
exception);
(void) FormatLocaleFile(file," Background color: %s\n",color);
(void) QueryColorname(image,&image->border_color,SVGCompliance,color,
exception);
(void) FormatLocaleFile(file," Border color: %s\n",color);
- (void) QueryColorname(image,&image->matte_color,SVGCompliance,color,
- exception);
- (void) FormatLocaleFile(file," Matte color: %s\n",color);
(void) QueryColorname(image,&image->transparent_color,SVGCompliance,color,
exception);
(void) FormatLocaleFile(file," Transparent color: %s\n",color);
diff --git a/MagickCore/image-private.h b/MagickCore/image-private.h
index 0745ac5..66809bf 100644
--- a/MagickCore/image-private.h
+++ b/MagickCore/image-private.h
@@ -36,13 +36,13 @@
#define UndefinedCompressionQuality 0UL
extern MagickExport const char
+ AlphaColor[],
BackgroundColor[],
BorderColor[],
DefaultTileFrame[],
DefaultTileGeometry[],
DefaultTileLabel[],
ForegroundColor[],
- MatteColor[],
LoadImageTag[],
LoadImagesTag[],
PSDensityGeometry[],
diff --git a/MagickCore/image.c b/MagickCore/image.c
index 6d1d3b1..690292b 100644
--- a/MagickCore/image.c
+++ b/MagickCore/image.c
@@ -103,6 +103,7 @@
Constant declaration.
*/
const char
+ AlphaColor[] = "#bdbdbd", /* gray */
BackgroundColor[] = "#ffffff", /* white */
BorderColor[] = "#dfdfdf", /* gray */
DefaultTileFrame[] = "15x15+3+3",
@@ -111,7 +112,6 @@
ForegroundColor[] = "#000", /* black */
LoadImageTag[] = "Load/Image",
LoadImagesTag[] = "Load/Images",
- MatteColor[] = "#bdbdbd", /* gray */
PSDensityGeometry[] = "72.0x72.0",
PSPageGeometry[] = "612x792",
SaveImageTag[] = "Save/Image",
@@ -192,12 +192,12 @@
image->interlace=NoInterlace;
image->ticks_per_second=UndefinedTicksPerSecond;
image->compose=OverCompositeOp;
+ (void) QueryColorCompliance(AlphaColor,AllCompliance,&image->alpha_color,
+ exception);
(void) QueryColorCompliance(BackgroundColor,AllCompliance,
&image->background_color,exception);
(void) QueryColorCompliance(BorderColor,AllCompliance,&image->border_color,
exception);
- (void) QueryColorCompliance(MatteColor,AllCompliance,&image->matte_color,
- exception);
(void) QueryColorCompliance(TransparentColor,AllCompliance,
&image->transparent_color,exception);
GetTimerInfo(&image->timer);
@@ -273,9 +273,9 @@
if (image_info->depth != 0)
image->depth=image_info->depth;
image->dither=image_info->dither;
+ image->alpha_color=image_info->alpha_color;
image->background_color=image_info->background_color;
image->border_color=image_info->border_color;
- image->matte_color=image_info->matte_color;
image->transparent_color=image_info->transparent_color;
image->ping=image_info->ping;
image->progress_monitor=image_info->progress_monitor;
@@ -970,9 +970,9 @@
(void) CloneString(&clone_info->density,image_info->density);
clone_info->pointsize=image_info->pointsize;
clone_info->fuzz=image_info->fuzz;
+ clone_info->alpha_color=image_info->alpha_color;
clone_info->background_color=image_info->background_color;
clone_info->border_color=image_info->border_color;
- clone_info->matte_color=image_info->matte_color;
clone_info->transparent_color=image_info->transparent_color;
clone_info->dither=image_info->dither;
clone_info->monochrome=image_info->monochrome;
@@ -1362,12 +1362,12 @@
synchronize=DestroyString(synchronize);
}
exception=AcquireExceptionInfo();
+ (void) QueryColorCompliance(AlphaColor,AllCompliance,&image_info->alpha_color,
+ exception);
(void) QueryColorCompliance(BackgroundColor,AllCompliance,
&image_info->background_color,exception);
(void) QueryColorCompliance(BorderColor,AllCompliance,
&image_info->border_color,exception);
- (void) QueryColorCompliance(MatteColor,AllCompliance,&image_info->matte_color,
- exception);
(void) QueryColorCompliance(TransparentColor,AllCompliance,
&image_info->transparent_color,exception);
exception=DestroyExceptionInfo(exception);
@@ -3663,6 +3663,10 @@
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
+ option=GetImageOption(image_info,"alpha-color");
+ if (option != (const char *) NULL)
+ (void) QueryColorCompliance(option,AllCompliance,&image->alpha_color,
+ exception);
option=GetImageOption(image_info,"background");
if (option != (const char *) NULL)
(void) QueryColorCompliance(option,AllCompliance,&image->background_color,
@@ -3756,10 +3760,6 @@
option=GetImageOption(image_info,"loop");
if (option != (const char *) NULL)
image->iterations=StringToUnsignedLong(option);
- option=GetImageOption(image_info,"mattecolor");
- if (option != (const char *) NULL)
- (void) QueryColorCompliance(option,AllCompliance,&image->matte_color,
- exception);
option=GetImageOption(image_info,"orient");
if (option != (const char *) NULL)
image->orientation=(OrientationType) ParseCommandOption(
diff --git a/MagickCore/image.h b/MagickCore/image.h
index b9e22e1..e3ec594 100644
--- a/MagickCore/image.h
+++ b/MagickCore/image.h
@@ -180,9 +180,9 @@
PixelInfo
*colormap,
+ alpha_color, /* current alphacolor attribute */
background_color, /* current background color attribute */
border_color, /* current bordercolor attribute */
- matte_color, /* current mattecolor attribute */
transparent_color; /* color for 'transparent' color index in GIF */
double
@@ -412,9 +412,9 @@
fuzz; /* current color fuzz attribute */
PixelInfo
+ alpha_color, /* alpha (frame) color */
background_color, /* user set background color */
border_color, /* user set border color */
- matte_color, /* matte (frame) color */
transparent_color; /* color for transparent index in color tables */
/* NB: fill color is only needed in draw_info! */
/* the same for undercolor (for font drawing) */
diff --git a/MagickCore/montage.c b/MagickCore/montage.c
index 37629f9..73ff4a6 100644
--- a/MagickCore/montage.c
+++ b/MagickCore/montage.c
@@ -129,9 +129,9 @@
clone_info->shadow=montage_info->shadow;
clone_info->fill=montage_info->fill;
clone_info->stroke=montage_info->stroke;
+ clone_info->alpha_color=montage_info->alpha_color;
clone_info->background_color=montage_info->background_color;
clone_info->border_color=montage_info->border_color;
- clone_info->matte_color=montage_info->matte_color;
clone_info->gravity=montage_info->gravity;
(void) CopyMagickString(clone_info->filename,montage_info->filename,
MagickPathExtent);
@@ -231,9 +231,9 @@
montage_info->pointsize=image_info->pointsize;
montage_info->fill.alpha=OpaqueAlpha;
montage_info->stroke.alpha=(Quantum) TransparentAlpha;
+ montage_info->alpha_color=image_info->alpha_color;
montage_info->background_color=image_info->background_color;
montage_info->border_color=image_info->border_color;
- montage_info->matte_color=image_info->matte_color;
montage_info->debug=IsEventLogging();
montage_info->signature=MagickCoreSignature;
}
diff --git a/MagickCore/montage.h b/MagickCore/montage.h
index c120abd..5dc9066 100644
--- a/MagickCore/montage.h
+++ b/MagickCore/montage.h
@@ -50,11 +50,11 @@
shadow;
PixelInfo
- fill,
- stroke,
+ alpha_color,
background_color,
border_color,
- matte_color;
+ fill,
+ stroke;
GravityType
gravity;
diff --git a/MagickCore/option.c b/MagickCore/option.c
index 2959da6..44749d4 100644
--- a/MagickCore/option.c
+++ b/MagickCore/option.c
@@ -275,6 +275,8 @@
{ "-affine", 1L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
{ "+affinity", 0L, DeprecateOptionFlag, MagickTrue },
{ "-affinity", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
+ { "+alpha-color", 0L, ImageInfoOptionFlag, MagickFalse },
+ { "-alpha-color", 1L, ImageInfoOptionFlag, MagickFalse },
{ "+annotate", 0L, DeprecateOptionFlag, MagickTrue },
{ "-annotate", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
{ "-antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
@@ -573,8 +575,6 @@
{ "-mask", 1L, DeprecateOptionFlag | NeverInterpretArgsFlag, MagickFalse },
{ "-matte", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
{ "+matte", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
- { "+mattecolor", 0L, ImageInfoOptionFlag, MagickFalse },
- { "-mattecolor", 1L, ImageInfoOptionFlag, MagickFalse },
{ "-maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
{ "+maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
{ "+mean-shift", 1L, DeprecateOptionFlag, MagickTrue },
diff --git a/MagickCore/property.c b/MagickCore/property.c
index 4604fd5..aea93b1 100644
--- a/MagickCore/property.c
+++ b/MagickCore/property.c
@@ -148,9 +148,9 @@
image->compression=clone_image->compression;
image->quality=clone_image->quality;
image->depth=clone_image->depth;
+ image->alpha_color=clone_image->alpha_color;
image->background_color=clone_image->background_color;
image->border_color=clone_image->border_color;
- image->matte_color=clone_image->matte_color;
image->transparent_color=clone_image->transparent_color;
image->gamma=clone_image->gamma;
image->chromaticity=clone_image->chromaticity;
diff --git a/MagickCore/xwindow-private.h b/MagickCore/xwindow-private.h
index c7999a8..d2b99a2 100644
--- a/MagickCore/xwindow-private.h
+++ b/MagickCore/xwindow-private.h
@@ -198,10 +198,10 @@
*pixels;
XColor
+ alpha_color,
foreground_color,
background_color,
border_color,
- matte_color,
highlight_color,
shadow_color,
depth_color,
@@ -282,8 +282,8 @@
*image_geometry;
char
+ *alpha_color,
*map_type,
- *matte_color,
*name;
unsigned int
diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c
index c9c4e93..72b7ec1 100644
--- a/MagickCore/xwindow.c
+++ b/MagickCore/xwindow.c
@@ -3108,31 +3108,31 @@
/*
Set matte color.
*/
- pixel->matte_color=pixel->background_color;
- if (resource_info->matte_color != (char *) NULL)
+ pixel->alpha_color=pixel->background_color;
+ if (resource_info->alpha_color != (char *) NULL)
{
/*
Matte color is specified as a X resource or command line argument.
*/
- status=XParseColor(display,colormap,resource_info->matte_color,
- &pixel->matte_color);
+ status=XParseColor(display,colormap,resource_info->alpha_color,
+ &pixel->alpha_color);
if (status == False)
ThrowXWindowException(XServerError,"ColorIsNotKnownToServer",
- resource_info->matte_color);
- pixel->matte_color.pixel=XStandardPixel(map_info,&pixel->matte_color);
- pixel->matte_color.flags=(char) (DoRed | DoGreen | DoBlue);
+ resource_info->alpha_color);
+ pixel->alpha_color.pixel=XStandardPixel(map_info,&pixel->alpha_color);
+ pixel->alpha_color.flags=(char) (DoRed | DoGreen | DoBlue);
}
/*
Set highlight color.
*/
pixel->highlight_color.red=(unsigned short) (((double)
- pixel->matte_color.red*ScaleQuantumToShort(HighlightModulate))/65535L+
+ pixel->alpha_color.red*ScaleQuantumToShort(HighlightModulate))/65535L+
(ScaleQuantumToShort((Quantum) (QuantumRange-HighlightModulate))));
pixel->highlight_color.green=(unsigned short) (((double)
- pixel->matte_color.green*ScaleQuantumToShort(HighlightModulate))/65535L+
+ pixel->alpha_color.green*ScaleQuantumToShort(HighlightModulate))/65535L+
(ScaleQuantumToShort((Quantum) (QuantumRange-HighlightModulate))));
pixel->highlight_color.blue=(unsigned short) (((double)
- pixel->matte_color.blue*ScaleQuantumToShort(HighlightModulate))/65535L+
+ pixel->alpha_color.blue*ScaleQuantumToShort(HighlightModulate))/65535L+
(ScaleQuantumToShort((Quantum) (QuantumRange-HighlightModulate))));
pixel->highlight_color.pixel=XStandardPixel(map_info,&pixel->highlight_color);
pixel->highlight_color.flags=(char) (DoRed | DoGreen | DoBlue);
@@ -3140,33 +3140,33 @@
Set shadow color.
*/
pixel->shadow_color.red=(unsigned short) (((double)
- pixel->matte_color.red*ScaleQuantumToShort(ShadowModulate))/65535L);
+ pixel->alpha_color.red*ScaleQuantumToShort(ShadowModulate))/65535L);
pixel->shadow_color.green=(unsigned short) (((double)
- pixel->matte_color.green*ScaleQuantumToShort(ShadowModulate))/65535L);
+ pixel->alpha_color.green*ScaleQuantumToShort(ShadowModulate))/65535L);
pixel->shadow_color.blue=(unsigned short) (((double)
- pixel->matte_color.blue*ScaleQuantumToShort(ShadowModulate))/65535L);
+ pixel->alpha_color.blue*ScaleQuantumToShort(ShadowModulate))/65535L);
pixel->shadow_color.pixel=XStandardPixel(map_info,&pixel->shadow_color);
pixel->shadow_color.flags=(char) (DoRed | DoGreen | DoBlue);
/*
Set depth color.
*/
pixel->depth_color.red=(unsigned short) (((double)
- pixel->matte_color.red*ScaleQuantumToShort(DepthModulate))/65535L);
+ pixel->alpha_color.red*ScaleQuantumToShort(DepthModulate))/65535L);
pixel->depth_color.green=(unsigned short) (((double)
- pixel->matte_color.green*ScaleQuantumToShort(DepthModulate))/65535L);
+ pixel->alpha_color.green*ScaleQuantumToShort(DepthModulate))/65535L);
pixel->depth_color.blue=(unsigned short) (((double)
- pixel->matte_color.blue*ScaleQuantumToShort(DepthModulate))/65535L);
+ pixel->alpha_color.blue*ScaleQuantumToShort(DepthModulate))/65535L);
pixel->depth_color.pixel=XStandardPixel(map_info,&pixel->depth_color);
pixel->depth_color.flags=(char) (DoRed | DoGreen | DoBlue);
/*
Set trough color.
*/
pixel->trough_color.red=(unsigned short) (((double)
- pixel->matte_color.red*ScaleQuantumToShort(TroughModulate))/65535L);
+ pixel->alpha_color.red*ScaleQuantumToShort(TroughModulate))/65535L);
pixel->trough_color.green=(unsigned short) (((double)
- pixel->matte_color.green*ScaleQuantumToShort(TroughModulate))/65535L);
+ pixel->alpha_color.green*ScaleQuantumToShort(TroughModulate))/65535L);
pixel->trough_color.blue=(unsigned short) (((double)
- pixel->matte_color.blue*ScaleQuantumToShort(TroughModulate))/65535L);
+ pixel->alpha_color.blue*ScaleQuantumToShort(TroughModulate))/65535L);
pixel->trough_color.pixel=XStandardPixel(map_info,&pixel->trough_color);
pixel->trough_color.flags=(char) (DoRed | DoGreen | DoBlue);
/*
@@ -3479,6 +3479,8 @@
resource_info->quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL);
resource_info->close_server=MagickTrue;
resource_info->client_name=AcquireString(client_name);
+ resource_info->alpha_color=XGetResourceInstance(database,client_name,
+ "alpha-color",(char *) NULL);
resource_value=XGetResourceClass(database,client_name,"backdrop",
(char *) "False");
resource_info->backdrop=IsStringTrue(resource_value);
@@ -3569,8 +3571,6 @@
resource_info->magnify=(unsigned int) StringToUnsignedLong(resource_value);
resource_info->map_type=XGetResourceClass(database,client_name,"map",
(char *) NULL);
- resource_info->matte_color=XGetResourceInstance(database,client_name,
- "mattecolor",(char *) NULL);
resource_info->name=ConstantString(XGetResourceClass(database,client_name,
"name",(char *) NULL));
resource_info->pen_colors[0]=XGetResourceClass(database,client_name,"pen1",
@@ -7920,7 +7920,7 @@
(void) XAllocColor(display,colormap,&pixel->foreground_color);
(void) XAllocColor(display,colormap,&pixel->background_color);
(void) XAllocColor(display,colormap,&pixel->border_color);
- (void) XAllocColor(display,colormap,&pixel->matte_color);
+ (void) XAllocColor(display,colormap,&pixel->alpha_color);
(void) XAllocColor(display,colormap,&pixel->highlight_color);
(void) XAllocColor(display,colormap,&pixel->shadow_color);
(void) XAllocColor(display,colormap,&pixel->depth_color);
@@ -8255,7 +8255,7 @@
XBestPixel(display,colormap,colors,(unsigned int) number_colors,
&pixel->border_color);
XBestPixel(display,colormap,colors,(unsigned int) number_colors,
- &pixel->matte_color);
+ &pixel->alpha_color);
XBestPixel(display,colormap,colors,(unsigned int) number_colors,
&pixel->highlight_color);
XBestPixel(display,colormap,colors,(unsigned int) number_colors,
diff --git a/MagickWand/animate.c b/MagickWand/animate.c
index db8b9c8..a1833a7 100644
--- a/MagickWand/animate.c
+++ b/MagickWand/animate.c
@@ -209,8 +209,8 @@
(void) printf(
"resources as command line options: -background, -bordercolor,\n");
(void) printf(
- "-borderwidth, -font, -foreground, -iconGeometry, -iconic, -name,\n");
- (void) printf("-mattecolor, -shared-memory, or -title.\n");
+ "-alpha-color, -borderwidth, -font, -foreground, -iconGeometry,\n");
+ (void) printf("-iconic, -name, -shared-memory, or -title.\n");
(void) printf(
"\nBy default, the image format of 'file' is determined by its magic\n");
(void) printf(
@@ -467,6 +467,16 @@
argv[i]);
break;
}
+ if (LocaleCompare("alpha-color",option+1) == 0)
+ {
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) argc)
+ ThrowAnimateException(OptionError,"MissingArgument",option);
+ resource_info.alpha_color=argv[i];
+ break;
+ }
if (LocaleCompare("authenticate",option+1) == 0)
{
if (*option == '+')
@@ -1052,16 +1062,6 @@
}
if (LocaleCompare("matte",option+1) == 0)
break;
- if (LocaleCompare("mattecolor",option+1) == 0)
- {
- if (*option == '+')
- break;
- i++;
- if (i == (ssize_t) argc)
- ThrowAnimateException(OptionError,"MissingArgument",option);
- resource_info.matte_color=argv[i];
- break;
- }
if (LocaleCompare("monitor",option+1) == 0)
break;
if (LocaleCompare("monochrome",option+1) == 0)
diff --git a/MagickWand/convert.c b/MagickWand/convert.c
index d29b0a3..6897079 100644
--- a/MagickWand/convert.c
+++ b/MagickWand/convert.c
@@ -356,6 +356,7 @@
"-adjoin join images into a single multi-image file",
"-affine matrix affine transform matrix",
"-alpha option activate, deactivate, reset, or set the alpha channel",
+ "-alpha-color color frame color",
"-antialias remove pixel-aliasing",
"-authenticate password",
" decipher image with this password",
@@ -408,7 +409,6 @@
"-limit type value pixel cache resource limit",
"-loop iterations add Netscape loop extension to your GIF animation",
"-matte store matte channel if the image has one",
- "-mattecolor color frame color",
"-moments report image moments",
"-monitor monitor progress",
"-orient type image orientation",
@@ -699,6 +699,15 @@
"UnrecognizedAlphaChannelOption",argv[i]);
break;
}
+ if (LocaleCompare("alpha-color", option + 1) == 0)
+ {
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t)argc)
+ ThrowConvertException(OptionError, "MissingArgument", option);
+ break;
+ }
if (LocaleCompare("annotate",option+1) == 0)
{
if (*option == '+')
@@ -2104,15 +2113,6 @@
}
if (LocaleCompare("matte",option+1) == 0)
break;
- if (LocaleCompare("mattecolor",option+1) == 0)
- {
- if (*option == '+')
- break;
- i++;
- if (i == (ssize_t) argc)
- ThrowConvertException(OptionError,"MissingArgument",option);
- break;
- }
if (LocaleCompare("maximum",option+1) == 0)
break;
if (LocaleCompare("mean-shift",option+1) == 0)
diff --git a/MagickWand/display.c b/MagickWand/display.c
index fd3db40..19e49d3 100644
--- a/MagickWand/display.c
+++ b/MagickWand/display.c
@@ -244,8 +244,8 @@
(void) printf(
"resources as command line options: -background, -bordercolor,\n");
(void) printf(
- "-borderwidth, -font, -foreground, -iconGeometry, -iconic, -mattecolor,\n");
- (void) printf("-name, -shared-memory, -usePixmap, or -title.\n");
+ " -alpha-color, -borderwidth, -font, -foreground, -iconGeometry,\n");
+ (void) printf("-iconic, -name, -shared-memory, -usePixmap, or -title.\n");
(void) printf(
"\nBy default, the image format of 'file' is determined by its magic\n");
(void) printf(
@@ -1378,14 +1378,14 @@
}
if (LocaleCompare("matte",option+1) == 0)
break;
- if (LocaleCompare("mattecolor",option+1) == 0)
+ if (LocaleCompare("alpha-color",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowDisplayException(OptionError,"MissingArgument",option);
- resource_info.matte_color=argv[i];
+ resource_info.alpha_color=argv[i];
break;
}
if (LocaleCompare("monitor",option+1) == 0)
diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c
index e1a1aa6..f128dc2 100644
--- a/MagickWand/magick-image.c
+++ b/MagickWand/magick-image.c
@@ -3386,7 +3386,7 @@
% The format of the MagickFrameImage method is:
%
% MagickBooleanType MagickFrameImage(MagickWand *wand,
-% const PixelWand *matte_color,const size_t width,
+% const PixelWand *alpha_color,const size_t width,
% const size_t height,const ssize_t inner_bevel,
% const ssize_t outer_bevel,const CompositeOperator compose)
%
@@ -3394,7 +3394,7 @@
%
% o wand: the magick wand.
%
-% o matte_color: the frame color pixel wand.
+% o alpha_color: the frame color pixel wand.
%
% o width: the border width.
%
@@ -3408,7 +3408,7 @@
%
*/
WandExport MagickBooleanType MagickFrameImage(MagickWand *wand,
- const PixelWand *matte_color,const size_t width,const size_t height,
+ const PixelWand *alpha_color,const size_t width,const size_t height,
const ssize_t inner_bevel,const ssize_t outer_bevel,
const CompositeOperator compose)
{
@@ -3431,7 +3431,7 @@
frame_info.y=(ssize_t) height;
frame_info.inner_bevel=inner_bevel;
frame_info.outer_bevel=outer_bevel;
- PixelGetQuantumPacket(matte_color,&wand->images->matte_color);
+ PixelGetQuantumPacket(alpha_color,&wand->images->alpha_color);
frame_image=FrameImage(wand->images,&frame_info,compose,wand->exception);
if (frame_image == (Image *) NULL)
return(MagickFalse);
@@ -3705,6 +3705,44 @@
ThrowWandException(WandError,"ContainsNoImages",wand->name);
return(GetImageAlphaChannel(wand->images));
}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% M a g i c k G e t I m a g e A l p h a C o l o r %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% MagickGetImageAlhpaColor() returns the image alpha color.
+%
+% The format of the MagickGetImageAlhpaColor method is:
+%
+% MagickBooleanType MagickGetImageAlhpaColor(MagickWand *wand,
+% PixelWand *alpha_color)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+% o alpha_color: return the alpha color.
+%
+*/
+WandExport MagickBooleanType MagickGetImageAlhpaColor(MagickWand *wand,
+ PixelWand *alpha_color)
+{
+ assert(wand != (MagickWand *)NULL);
+ assert(wand->signature == MagickWandSignature);
+ if (wand->debug != MagickFalse)
+ (void) LogMagickEvent(WandEvent, GetMagickModule(), "%s", wand->name);
+ if (wand->images == (Image *)NULL)
+ ThrowWandException(WandError, "ContainsNoImages", wand->name);
+ PixelSetPixelColor(alpha_color, &wand->images->alpha_color);
+ return(MagickTrue);
+}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5162,44 +5200,6 @@
% %
% %
% %
-% M a g i c k G e t I m a g e M a t t e C o l o r %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% MagickGetImageMatteColor() returns the image matte color.
-%
-% The format of the MagickGetImageMatteColor method is:
-%
-% MagickBooleanType MagickGetImagematteColor(MagickWand *wand,
-% PixelWand *matte_color)
-%
-% A description of each parameter follows:
-%
-% o wand: the magick wand.
-%
-% o matte_color: Return the matte color.
-%
-*/
-WandExport MagickBooleanType MagickGetImageMatteColor(MagickWand *wand,
- PixelWand *matte_color)
-{
- assert(wand != (MagickWand *) NULL);
- assert(wand->signature == MagickWandSignature);
- if (wand->debug != MagickFalse)
- (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- if (wand->images == (Image *) NULL)
- ThrowWandException(WandError,"ContainsNoImages",wand->name);
- PixelSetPixelColor(matte_color,&wand->images->matte_color);
- return(MagickTrue);
-}
-
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
% M a g i c k G e t I m a g e O r i e n t a t i o n %
% %
% %
@@ -9037,6 +9037,44 @@
ThrowWandException(WandError,"ContainsNoImages",wand->name);
return(SetImageAlphaChannel(wand->images,alpha_type,wand->exception));
}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% M a g i c k S e t I m a g e A l p h a C o l o r %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% MagickSetImageAlphaColor() sets the image alpha color.
+%
+% The format of the MagickSetImageAlphaColor method is:
+%
+% MagickBooleanType MagickSetImageAlphaColor(MagickWand *wand,
+% const PixelWand *matte)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+% o matte: the alpha pixel wand.
+%
+*/
+WandExport MagickBooleanType MagickSetImageAlphaColor(MagickWand *wand,
+ const PixelWand *alpha)
+{
+ assert(wand != (MagickWand *)NULL);
+ assert(wand->signature == MagickWandSignature);
+ if (wand->debug != MagickFalse)
+ (void) LogMagickEvent(WandEvent, GetMagickModule(), "%s", wand->name);
+ if (wand->images == (Image *)NULL)
+ ThrowWandException(WandError, "ContainsNoImages", wand->name);
+ PixelGetQuantumPacket(alpha, &wand->images->alpha_color);
+ return(MagickTrue);
+}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -10050,9 +10088,9 @@
%
% MagickSetImageMatte() sets the image matte channel.
%
-% The format of the MagickSetImageMatteColor method is:
+% The format of the MagickSetImageMatte method is:
%
-% MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
+% MagickBooleanType MagickSetImageMatte(MagickWand *wand,
% const MagickBooleanType *matte)
%
% A description of each parameter follows:
@@ -10088,44 +10126,6 @@
% %
% %
% %
-% M a g i c k S e t I m a g e M a t t e C o l o r %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% MagickSetImageMatteColor() sets the image matte color.
-%
-% The format of the MagickSetImageMatteColor method is:
-%
-% MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
-% const PixelWand *matte)
-%
-% A description of each parameter follows:
-%
-% o wand: the magick wand.
-%
-% o matte: the matte pixel wand.
-%
-*/
-WandExport MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
- const PixelWand *matte)
-{
- assert(wand != (MagickWand *) NULL);
- assert(wand->signature == MagickWandSignature);
- if (wand->debug != MagickFalse)
- (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- if (wand->images == (Image *) NULL)
- ThrowWandException(WandError,"ContainsNoImages",wand->name);
- PixelGetQuantumPacket(matte,&wand->images->matte_color);
- return(MagickTrue);
-}
-
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
% M a g i c k S e t I m a g e O p a c i t y %
% %
% %
diff --git a/MagickWand/magick-image.h b/MagickWand/magick-image.h
index 0861447..9be145f 100644
--- a/MagickWand/magick-image.h
+++ b/MagickWand/magick-image.h
@@ -153,6 +153,7 @@
MagickGammaImage(MagickWand *,const double),
MagickGaussianBlurImage(MagickWand *,const double,const double),
MagickGetImageAlphaChannel(MagickWand *),
+ MagickGetImageAlphaColor(MagickWand *,PixelWand *),
MagickGetImageBackgroundColor(MagickWand *,PixelWand *),
MagickGetImageBluePrimary(MagickWand *,double *,double *,double *),
MagickGetImageBorderColor(MagickWand *,PixelWand *),
@@ -163,7 +164,6 @@
MagickGetImageDistortion(MagickWand *,const MagickWand *,const MetricType,
double *),
MagickGetImageGreenPrimary(MagickWand *,double *,double *,double *),
- MagickGetImageMatteColor(MagickWand *,PixelWand *),
MagickGetImageLength(MagickWand *,MagickSizeType *),
MagickGetImagePage(MagickWand *,size_t *,size_t *,ssize_t *,
ssize_t *),
@@ -243,7 +243,9 @@
MagickSeparateImage(MagickWand *,const ChannelType),
MagickSepiaToneImage(MagickWand *,const double),
MagickSetImage(MagickWand *,const MagickWand *),
+ MagickSetImageAlpha(MagickWand *,const double),
MagickSetImageAlphaChannel(MagickWand *,const AlphaChannelOption),
+ MagickSetImageAlphaColor(MagickWand *,const PixelWand *),
MagickSetImageBackgroundColor(MagickWand *,const PixelWand *),
MagickSetImageBluePrimary(MagickWand *,const double,const double,
const double),
@@ -272,8 +274,6 @@
const PixelInterpolateMethod),
MagickSetImageIterations(MagickWand *,const size_t),
MagickSetImageMatte(MagickWand *,const MagickBooleanType),
- MagickSetImageMatteColor(MagickWand *,const PixelWand *),
- 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/mogrify.c b/MagickWand/mogrify.c
index aeabcc2..2cdb431 100644
--- a/MagickWand/mogrify.c
+++ b/MagickWand/mogrify.c
@@ -58,9 +58,9 @@
Constant declaration.
*/
static const char
+ MogrifyAlphaColor[] = "#bdbdbd", /* gray */
MogrifyBackgroundColor[] = "#ffffff", /* white */
- MogrifyBorderColor[] = "#dfdfdf", /* gray */
- MogrifyMatteColor[] = "#bdbdbd"; /* gray */
+ MogrifyBorderColor[] = "#dfdfdf"; /* gray */
/*
Define declarations.
@@ -3622,6 +3622,7 @@
"-adjoin join images into a single multi-image file",
"-affine matrix affine transform matrix",
"-alpha option activate, deactivate, reset, or set the alpha channel",
+ "-alpha-color color frame color",
"-antialias remove pixel-aliasing",
"-authenticate password",
" decipher image with this password",
@@ -3671,7 +3672,6 @@
"-limit type value pixel cache resource limit",
"-loop iterations add Netscape loop extension to your GIF animation",
"-matte store matte channel if the image has one",
- "-mattecolor color frame color",
"-monitor monitor progress",
"-orient type image orientation",
"-page geometry size and location of an image canvas (setting)",
@@ -4007,6 +4007,15 @@
argv[i]);
break;
}
+ if (LocaleCompare("alpha-color",option+1) == 0)
+ {
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) argc)
+ ThrowMogrifyException(OptionError,"MissingArgument",option);
+ break;
+ }
if (LocaleCompare("annotate",option+1) == 0)
{
if (*option == '+')
@@ -5322,15 +5331,6 @@
}
if (LocaleCompare("matte",option+1) == 0)
break;
- if (LocaleCompare("mattecolor",option+1) == 0)
- {
- if (*option == '+')
- break;
- i++;
- if (i == (ssize_t) argc)
- ThrowMogrifyException(OptionError,"MissingArgument",option);
- break;
- }
if (LocaleCompare("maximum",option+1) == 0)
break;
if (LocaleCompare("mean-shift",option+1) == 0)
@@ -6519,6 +6519,20 @@
image_info->adjoin=(*option == '-') ? MagickTrue : MagickFalse;
break;
}
+ if (LocaleCompare("alpha-color",option+1) == 0)
+ {
+ if (*option == '+')
+ {
+ (void) SetImageOption(image_info,option+1,argv[i+1]);
+ (void) QueryColorCompliance(MogrifyAlphaColor,AllCompliance,
+ &image_info->alpha_color,exception);
+ break;
+ }
+ (void) SetImageOption(image_info,option+1,argv[i+1]);
+ (void) QueryColorCompliance(argv[i+1],AllCompliance,
+ &image_info->alpha_color,exception);
+ break;
+ }
if (LocaleCompare("antialias",option+1) == 0)
{
image_info->antialias=(*option == '-') ? MagickTrue : MagickFalse;
@@ -7153,20 +7167,6 @@
(void) SetImageOption(image_info,option+1,"true");
break;
}
- if (LocaleCompare("mattecolor",option+1) == 0)
- {
- if (*option == '+')
- {
- (void) SetImageOption(image_info,option+1,argv[i+1]);
- (void) QueryColorCompliance(MogrifyMatteColor,AllCompliance,
- &image_info->matte_color,exception);
- break;
- }
- (void) SetImageOption(image_info,option+1,argv[i+1]);
- (void) QueryColorCompliance(argv[i+1],AllCompliance,
- &image_info->matte_color,exception);
- break;
- }
if (LocaleCompare("metric",option+1) == 0)
{
if (*option == '+')
diff --git a/MagickWand/montage.c b/MagickWand/montage.c
index ff93f8b..106b837 100644
--- a/MagickWand/montage.c
+++ b/MagickWand/montage.c
@@ -132,6 +132,7 @@
"-affine matrix affine transform matrix",
"-alpha option on, activate, off, deactivate, set, opaque, copy",
" transparent, extract, background, or shape",
+ "-alpha-color color frame color",
"-authenticate password",
" decipher image with this password",
"-blue-primary point chromaticity blue primary point",
@@ -168,7 +169,6 @@
"-label string assign a label to an image",
"-limit type value pixel cache resource limit",
"-matte store matte channel if the image has one",
- "-mattecolor color frame color",
"-mode type framing style",
"-monitor monitor progress",
"-page geometry size and location of an image canvas (setting)",
@@ -247,7 +247,7 @@
(void) printf(
"resources as command line options: -background, -bordercolor,\n");
(void) printf(
- "-borderwidth, -font, -mattecolor, or -title\n");
+ "-alpha-color, -borderwidth, -font, or -title\n");
(void) printf(
"\nBy default, the image format of 'file' is determined by its magic\n");
(void) printf(
@@ -472,6 +472,17 @@
argv[i]);
break;
}
+ if (LocaleCompare("alpha-color",option+1) == 0)
+ {
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) argc)
+ ThrowMontageException(OptionError,"MissingArgument",option);
+ (void) QueryColorCompliance(argv[i],AllCompliance,
+ &montage_info->alpha_color,exception);
+ break;
+ }
if (LocaleCompare("annotate",option+1) == 0)
{
if (*option == '+')
@@ -1199,17 +1210,6 @@
{
if (LocaleCompare("matte",option+1) == 0)
break;
- if (LocaleCompare("mattecolor",option+1) == 0)
- {
- if (*option == '+')
- break;
- i++;
- if (i == (ssize_t) argc)
- ThrowMontageException(OptionError,"MissingArgument",option);
- (void) QueryColorCompliance(argv[i],AllCompliance,
- &montage_info->matte_color,exception);
- break;
- }
if (LocaleCompare("mode",option+1) == 0)
{
MontageMode
diff --git a/MagickWand/operation.c b/MagickWand/operation.c
index 98a7f07..9d58bcf 100644
--- a/MagickWand/operation.c
+++ b/MagickWand/operation.c
@@ -65,9 +65,9 @@
Constant declaration.
*/
static const char
+ MogrifyAlphaColor[] = "#bdbdbd", /* slightly darker gray */
MogrifyBackgroundColor[] = "#fff", /* white */
- MogrifyBorderColor[] = "#dfdfdf", /* sRGB gray */
- MogrifyMatteColor[] = "#bdbdbd"; /* slightly darker gray */
+ MogrifyBorderColor[] = "#dfdfdf"; /* sRGB gray */
/*
Define declarations.
@@ -484,6 +484,14 @@
GetAffineMatrix(&_draw_info->affine);
break;
}
+ if (LocaleCompare("alpha-color",option+1) == 0)
+ {
+ /* SyncImageSettings() used to set per-image attribute. */
+ (void) SetImageOption(_image_info,option+1,ArgOption(NULL));
+ (void) QueryColorCompliance(ArgOption(MogrifyAlphaColor),AllCompliance,
+ &_image_info->alpha_color,_exception);
+ break;
+ }
if (LocaleCompare("antialias",option+1) == 0)
{
_image_info->antialias =
@@ -1097,14 +1105,6 @@
}
case 'm':
{
- if (LocaleCompare("mattecolor",option+1) == 0)
- {
- /* SyncImageSettings() used to set per-image attribute. */
- (void) SetImageOption(_image_info,option+1,ArgOption(NULL));
- (void) QueryColorCompliance(ArgOption(MogrifyMatteColor),AllCompliance,
- &_image_info->matte_color,_exception);
- break;
- }
if (LocaleCompare("metric",option+1) == 0)
{
/* FUTURE: this is only used by CompareImages() which is used
diff --git a/coders/json.c b/coders/json.c
index a1aab00..727e7ed 100644
--- a/coders/json.c
+++ b/coders/json.c
@@ -1185,12 +1185,12 @@
" \"x\": %.20g,\n \"y\": %.20g\n },\n",
(double) image->extract_info.width,(double) image->extract_info.height,
(double) image->extract_info.x,(double) image->extract_info.y);
+ GetColorTuple(&image->alpha_color,MagickTrue,color);
+ (void) FormatLocaleFile(file," \"alphaColor\": \"%s\",\n",color);
GetColorTuple(&image->background_color,MagickTrue,color);
(void) FormatLocaleFile(file," \"backgroundColor\": \"%s\",\n",color);
GetColorTuple(&image->border_color,MagickTrue,color);
(void) FormatLocaleFile(file," \"borderColor\": \"%s\",\n",color);
- GetColorTuple(&image->matte_color,MagickTrue,color);
- (void) FormatLocaleFile(file," \"matteColor\": \"%s\",\n",color);
GetColorTuple(&image->transparent_color,MagickTrue,color);
(void) FormatLocaleFile(file," \"transparentColor\": \"%s\",\n",color);
JsonFormatLocaleFile(file," \"interlace\": %s,\n",CommandOptionToMnemonic(
diff --git a/coders/miff.c b/coders/miff.c
index 97038da..1ae115c 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -623,6 +623,12 @@
case 'a':
case 'A':
{
+ if (LocaleCompare(keyword,"alpha-color") == 0)
+ {
+ (void) QueryColorCompliance(options,AllCompliance,
+ &image->alpha_color,exception);
+ break;
+ }
if (LocaleCompare(keyword,"alpha-trait") == 0)
{
ssize_t
@@ -829,12 +835,6 @@
BlendPixelTrait;
break;
}
- if (LocaleCompare(keyword,"matte-color") == 0)
- {
- (void) QueryColorCompliance(options,AllCompliance,
- &image->matte_color,exception);
- break;
- }
if (LocaleCompare(keyword,"montage") == 0)
{
(void) CloneString(&image->montage,options);
diff --git a/coders/mpc.c b/coders/mpc.c
index 8264a68..f56db27 100644
--- a/coders/mpc.c
+++ b/coders/mpc.c
@@ -338,6 +338,12 @@
case 'a':
case 'A':
{
+ if (LocaleCompare(keyword,"alpha-color") == 0)
+ {
+ (void) QueryColorCompliance(options,AllCompliance,
+ &image->alpha_color,exception);
+ break;
+ }
if (LocaleCompare(keyword,"alpha-trait") == 0)
{
ssize_t
@@ -530,12 +536,6 @@
signature=(unsigned int) StringToUnsignedLong(options);
break;
}
- if (LocaleCompare(keyword,"matte-color") == 0)
- {
- (void) QueryColorCompliance(options,AllCompliance,
- &image->matte_color,exception);
- break;
- }
if (LocaleCompare(keyword,"maximum-error") == 0)
{
image->error.normalized_maximum_error=StringToDouble(
diff --git a/coders/msl.c b/coders/msl.c
index bc947b1..2b79b84 100644
--- a/coders/msl.c
+++ b/coders/msl.c
@@ -3081,7 +3081,7 @@
if (LocaleCompare(keyword, "fill") == 0)
{
(void) QueryColorCompliance(value,AllCompliance,
- &msl_info->image[n]->matte_color,exception);
+ &msl_info->image[n]->alpha_color,exception);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -7977,6 +7977,12 @@
exception);
break;
}
+ if (LocaleCompare(keyword,"alpha-color") == 0)
+ {
+ (void) QueryColorCompliance(value,AllCompliance,
+ &image_info->alpha_color,exception);
+ break;
+ }
if (LocaleCompare(keyword,"antialias") == 0)
{
ssize_t
@@ -8108,12 +8114,6 @@
(void) CopyMagickString(image_info->magick,value,MagickPathExtent);
break;
}
- if (LocaleCompare(keyword,"mattecolor") == 0)
- {
- (void) QueryColorCompliance(value,AllCompliance,
- &image_info->matte_color,exception);
- break;
- }
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
break;
}