]> granicus.if.org Git - imagemagick/commitdiff
Must support -mattecolor option for IMv6 compatibility.
authorCristy <urban-warrior@imagemagick.org>
Thu, 16 Feb 2017 12:29:19 +0000 (07:29 -0500)
committerCristy <urban-warrior@imagemagick.org>
Thu, 16 Feb 2017 12:29:19 +0000 (07:29 -0500)
29 files changed:
ChangeLog
MagickCore/decorate.c
MagickCore/display.c
MagickCore/distort.c
MagickCore/effect.c
MagickCore/identify.c
MagickCore/image.c
MagickCore/image.h
MagickCore/montage.c
MagickCore/montage.h
MagickCore/option.c
MagickCore/property.c
MagickCore/widget.c
MagickCore/xwindow-private.h
MagickCore/xwindow.c
MagickWand/animate.c
MagickWand/convert.c
MagickWand/deprecate.c
MagickWand/deprecate.h
MagickWand/display.c
MagickWand/magick-image.c
MagickWand/magick-image.h
MagickWand/mogrify.c
MagickWand/montage.c
MagickWand/operation.c
coders/json.c
coders/miff.c
coders/mpc.c
coders/msl.c

index b9ea93c09ad663a74e135b4c60bd4a3aecfa06ba..5e33e4a8374156ba915b00ade43a468439994ee5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2017-02-15  7.0.4-10 Cristy  <quetzlzacatenango@image...>
   * Prevent random pixel data for corrupt JPEG image (bug report from
     Hirokazu Moriguchi, Sony).
+  * Restore -mattecolor option.
 
 2017-02-14  7.0.4-9 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.4-9, GIT revision 19580:d474b37:20170214.
index 36853e979d028b848b3de24bf5062cac372da1aa..9e1f860772385bf9af248e97aad5d5f890aee83c 100644 (file)
@@ -125,11 +125,11 @@ MagickExport Image *BorderImage(const Image *image,
   clone_image=CloneImage(image,0,0,MagickTrue,exception);
   if (clone_image == (Image *) NULL)
     return((Image *) NULL);
-  clone_image->alpha_color=image->border_color;
+  clone_image->matte_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->alpha_color=image->alpha_color;
+    border_image->matte_color=image->matte_color;
   return(border_image);
 }
 \f
@@ -145,7 +145,7 @@ MagickExport Image *BorderImage(const Image *image,
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 %  FrameImage() adds a simulated three-dimensional border around the image.
-%  The color of the border is defined by the alpha_color member of image.
+%  The color of the border is defined by the matte_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 @@ MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info,
   if ((IsPixelInfoGray(&frame_image->border_color) == MagickFalse) &&
       (IsGrayColorspace(frame_image->colorspace) != MagickFalse))
     (void) SetImageColorspace(frame_image,sRGBColorspace,exception);
-  if ((frame_image->alpha_color.alpha_trait != UndefinedPixelTrait) &&
+  if ((frame_image->matte_color.alpha_trait != UndefinedPixelTrait) &&
       (frame_image->alpha_trait == UndefinedPixelTrait))
     (void) SetImageAlpha(frame_image,OpaqueAlpha,exception);
   frame_image->page=image->page;
@@ -244,7 +244,7 @@ MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info,
   /*
     Initialize 3D effects color.
   */
-  matte=image->alpha_color;
+  matte=image->matte_color;
   accentuate=matte;
   accentuate.red=(double) (QuantumScale*((QuantumRange-
     AccentuateModulate)*matte.red+(QuantumRange*AccentuateModulate)));
index 8f77bc52843485a17c227532d99a47ec381c7fae..b1d445ba01e93f8849edac4db528e89fd3f4db0d 100644 (file)
@@ -8917,7 +8917,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
         exception);
       XSetCursorState(display,windows,MagickTrue);
       XCheckRefreshWindows(display,windows);
-      (void) QueryColorCompliance(color,AllCompliance,&(*image)->alpha_color,
+      (void) QueryColorCompliance(color,AllCompliance,&(*image)->matte_color,
         exception);
       (void) ParsePageGeometry(*image,geometry,&page_geometry,
         exception);
index 624c3ff7688e187165eecd76267c5ecab5e7743f..f7dd04d54084355aabed22ff1d3730d250b405f9 100644 (file)
@@ -2367,13 +2367,13 @@ MagickExport Image *DistortImage(const Image *image, DistortMethod method,
       }
 
       /* Initialize default pixel validity
-      *    negative:         pixel is invalid  output 'alpha_color'
+      *    negative:         pixel is invalid  output 'matte_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->alpha_color,&invalid,
+      ConformPixelInfo(distort_image,&distort_image->matte_color,&invalid,
         exception);
       for (i=0; i < (ssize_t) distort_image->columns; i++)
       {
index 7a0c94c024ae79155fa18753fe08af2ab4b551be..8fdcda64d52c7e4ec904a84f196cd5d02a236814 100644 (file)
@@ -2323,7 +2323,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
     if (i == (NumberTiles/2))
       {
         (void) QueryColorCompliance("#dfdfdf",AllCompliance,
-          &thumbnail->alpha_color,exception);
+          &thumbnail->matte_color,exception);
         AppendImageToList(&images,thumbnail);
         continue;
       }
index 20c83bda345a7bcdfa50760e143bc67c2dc10972..076c37d3f23091aabe12de63674f06bd1577fbf1 100644 (file)
@@ -1155,9 +1155,9 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
     (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,
+  (void) QueryColorname(image,&image->matte_color,SVGCompliance,color,
     exception);
-  (void) FormatLocaleFile(file,"  Alpha color: %s\n",color);
+  (void) FormatLocaleFile(file,"  Matte color: %s\n",color);
   (void) QueryColorname(image,&image->background_color,SVGCompliance,color,
     exception);
   (void) FormatLocaleFile(file,"  Background color: %s\n",color);
index 30bf4b85db631bb169e4da538bd8aea775a7184f..bfee8a4fb198b78bde180b4004d0634f36525292 100644 (file)
   Constant declaration.
 */
 const char
-  AlphaColor[] = "#bdbdbd",  /* gray */
   BackgroundColor[] = "#ffffff",  /* white */
   BorderColor[] = "#dfdfdf",  /* gray */
   DefaultTileFrame[] = "15x15+3+3",
@@ -114,6 +113,7 @@ const char
   ForegroundColor[] = "#000",  /* black */
   LoadImageTag[] = "Load/Image",
   LoadImagesTag[] = "Load/Images",
+  MatteColor[] = "#bdbdbd",  /* gray */
   PSDensityGeometry[] = "72.0x72.0",
   PSPageGeometry[] = "612x792",
   SaveImageTag[] = "Save/Image",
@@ -194,7 +194,7 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info,
   image->interlace=NoInterlace;
   image->ticks_per_second=UndefinedTicksPerSecond;
   image->compose=OverCompositeOp;
-  (void) QueryColorCompliance(AlphaColor,AllCompliance,&image->alpha_color,
+  (void) QueryColorCompliance(MatteColor,AllCompliance,&image->matte_color,
     exception);
   (void) QueryColorCompliance(BackgroundColor,AllCompliance,
     &image->background_color,exception);
@@ -275,7 +275,7 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info,
   if (image_info->depth != 0)
     image->depth=image_info->depth;
   image->dither=image_info->dither;
-  image->alpha_color=image_info->alpha_color;
+  image->matte_color=image_info->matte_color;
   image->background_color=image_info->background_color;
   image->border_color=image_info->border_color;
   image->transparent_color=image_info->transparent_color;
@@ -974,7 +974,7 @@ MagickExport ImageInfo *CloneImageInfo(const ImageInfo *image_info)
   (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->matte_color=image_info->matte_color;
   clone_info->background_color=image_info->background_color;
   clone_info->border_color=image_info->border_color;
   clone_info->transparent_color=image_info->transparent_color;
@@ -1365,12 +1365,12 @@ MagickExport void GetImageInfo(ImageInfo *image_info)
       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);
@@ -3844,10 +3844,6 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
   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,
@@ -3938,6 +3934,10 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
   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(
index e9b28ed0647aad27c5cdef0cf4db990f483d89b1..1ade6ebb13a63b242fc41466cfaebfcd19c8af86 100644 (file)
@@ -177,7 +177,7 @@ struct _Image
 
   PixelInfo
     *colormap,
-    alpha_color,        /* current alphacolor attribute */
+    alpha_color,        /* deprecated */
     background_color,   /* current background color attribute */
     border_color,       /* current bordercolor attribute */
     transparent_color;  /* color for 'transparent' color index in GIF */
@@ -352,6 +352,9 @@ struct _Image
 
   size_t
     signature;
+
+  PixelInfo
+    matte_color;        /* current mattecolor attribute */
 };
 
 /*
@@ -409,7 +412,7 @@ struct _ImageInfo
     fuzz;               /* current color fuzz attribute */
 
   PixelInfo
-    alpha_color,        /* alpha (frame) color */
+    alpha_color,        /* deprecated */
     background_color,   /* user set background color */
     border_color,       /* user set border color */
     transparent_color;  /* color for transparent index in color tables */
@@ -477,6 +480,9 @@ struct _ImageInfo
 
   CustomStreamInfo
     *custom_stream;
+
+  PixelInfo
+    matte_color;        /* matte (frame) color */
 };
 
 extern MagickExport ChannelType
index e85375041e1fdd37ae5223e29858a2e84d12e525..325939a43eab25f675dd674a8ff60db948b86f33 100644 (file)
@@ -129,7 +129,7 @@ MagickExport MontageInfo *CloneMontageInfo(const ImageInfo *image_info,
   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->matte_color=montage_info->matte_color;
   clone_info->background_color=montage_info->background_color;
   clone_info->border_color=montage_info->border_color;
   clone_info->gravity=montage_info->gravity;
@@ -231,7 +231,7 @@ MagickExport void GetMontageInfo(const ImageInfo *image_info,
   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->matte_color=image_info->matte_color;
   montage_info->background_color=image_info->background_color;
   montage_info->border_color=image_info->border_color;
   montage_info->debug=IsEventLogging();
index 6702be65602c94cee5ee54eb836e00c8f5e5e280..54e92c64d20d1f7ebe031340a7acb52898b324fd 100644 (file)
@@ -50,7 +50,7 @@ typedef struct _MontageInfo
     shadow;
 
   PixelInfo
-    alpha_color,
+    alpha_color,  /* deprecated */
     background_color,
     border_color,
     fill,
@@ -67,6 +67,9 @@ typedef struct _MontageInfo
 
   size_t
     signature;
+
+  PixelInfo
+    matte_color;
 } MontageInfo;
 
 extern MagickExport Image
index b3a9645c5b7ead76c689c2a8cbadc96322c50003..e7c7d728d5e5f6338734e487bbeb160cf6852b57 100644 (file)
@@ -308,8 +308,8 @@ static const OptionInfo
     { "-affine", 1L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
     { "+affinity", 0L, DeprecateOptionFlag, MagickTrue },
     { "-affinity", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
-    { "+alpha-color", 0L, ImageInfoOptionFlag, MagickFalse },
-    { "-alpha-color", 1L, ImageInfoOptionFlag, MagickFalse },
+    { "+mattecolor", 0L, ImageInfoOptionFlag, MagickFalse },
+    { "-mattecolor", 1L, ImageInfoOptionFlag, MagickFalse },
     { "+annotate", 0L, DeprecateOptionFlag, MagickTrue },
     { "-annotate", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
     { "-antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
index 3351fe7a5a6e88f904e1f4322232b69e9b7e1175..8bb7088bed1dc12ef9fd96f83da5c86c7bb2c56f 100644 (file)
@@ -150,7 +150,7 @@ MagickExport MagickBooleanType CloneImageProperties(Image *image,
   image->compression=clone_image->compression;
   image->quality=clone_image->quality;
   image->depth=clone_image->depth;
-  image->alpha_color=clone_image->alpha_color;
+  image->matte_color=clone_image->matte_color;
   image->background_color=clone_image->background_color;
   image->border_color=clone_image->border_color;
   image->transparent_color=clone_image->transparent_color;
index 49c81e9a40f2b93857088852b74ea1a35cc0b5c4..254af648a2b033e760a22dcebf01840a89d89ec2 100644 (file)
@@ -1504,7 +1504,7 @@ static void XSetMatteColor(Display *display,const XWindowInfo *window_info,
   else
     if (raised)
       (void) XSetForeground(display,window_info->widget_context,
-        window_info->pixel_info->alpha_color.pixel);
+        window_info->pixel_info->matte_color.pixel);
     else
       (void) XSetForeground(display,window_info->widget_context,
         window_info->pixel_info->depth_color.pixel);
@@ -1560,7 +1560,7 @@ static void XSetTextColor(Display *display,const XWindowInfo *window_info,
     }
   foreground=(ssize_t) XPixelIntensity(
     &window_info->pixel_info->foreground_color);
-  matte=(ssize_t) XPixelIntensity(&window_info->pixel_info->alpha_color);
+  matte=(ssize_t) XPixelIntensity(&window_info->pixel_info->matte_color);
   if (MagickAbsoluteValue((int) (foreground-matte)) > (65535L >> 3))
     (void) XSetForeground(display,window_info->widget_context,
       window_info->pixel_info->foreground_color.pixel);
@@ -2084,19 +2084,19 @@ MagickPrivate void XColorBrowserWidget(Display *display,XWindows *windows,
         /*
           Display the selected color in a drawing area.
         */
-        color=windows->widget.pixel_info->alpha_color;
+        color=windows->widget.pixel_info->matte_color;
         (void) XParseColor(display,windows->widget.map_info->colormap,
-          reply_info.text,&windows->widget.pixel_info->alpha_color);
+          reply_info.text,&windows->widget.pixel_info->matte_color);
         XBestPixel(display,windows->widget.map_info->colormap,(XColor *) NULL,
           (unsigned int) windows->widget.visual_info->colormap_size,
-          &windows->widget.pixel_info->alpha_color);
+          &windows->widget.pixel_info->matte_color);
         mode_info.text=colorname;
-        (void) FormatLocaleString(mode_info.text,MagickPathExtent,"#%02x%02x%02x",
-          windows->widget.pixel_info->alpha_color.red,
-          windows->widget.pixel_info->alpha_color.green,
-          windows->widget.pixel_info->alpha_color.blue);
+        (void) FormatLocaleString(mode_info.text,MagickPathExtent,
+          "#%02x%02x%02x",windows->widget.pixel_info->matte_color.red,
+          windows->widget.pixel_info->matte_color.green,
+          windows->widget.pixel_info->matte_color.blue);
         XDrawBeveledButton(display,&windows->widget,&mode_info);
-        windows->widget.pixel_info->alpha_color=color;
+        windows->widget.pixel_info->matte_color=color;
         state&=(~RedrawActionState);
       }
     /*
index a1d8f6416fcd0eed48a09bc549b3a6aab0499b9b..c89064da79a3ee2c72dc0568a191e4e11ba63f53 100644 (file)
@@ -198,7 +198,7 @@ typedef struct _XPixelInfo
     *pixels;
 
   XColor
-    alpha_color,
+    alpha_color,  /* deprecated */
     foreground_color,
     background_color,
     border_color,
@@ -218,6 +218,9 @@ typedef struct _XPixelInfo
   unsigned short
     box_index,
     pen_index;
+
+  XColor
+    matte_color;
 } XPixelInfo;
 
 typedef struct _XResourceInfo
@@ -282,7 +285,7 @@ typedef struct _XResourceInfo
     *image_geometry;
 
   char
-    *alpha_color,
+    *alpha_color,  /* deprecated */
     *map_type,
     *name;
 
@@ -324,6 +327,9 @@ typedef struct _XResourceInfo
 
   char
     home_directory[MagickPathExtent];
+
+  char
+    *matte_color;
 } XResourceInfo;
 
 typedef struct _XWindowInfo
index 16b452a5fe2d306ac3bc66d6a31fb015c99acfaf..745529944729d7eb73a8b3f75154fe14d98ad1ce 100644 (file)
@@ -3109,31 +3109,31 @@ MagickPrivate void XGetPixelInfo(Display *display,
   /*
     Set matte color.
   */
-  pixel->alpha_color=pixel->background_color;
-  if (resource_info->alpha_color != (char *) NULL)
+  pixel->matte_color=pixel->background_color;
+  if (resource_info->matte_color != (char *) NULL)
     {
       /*
         Matte color is specified as a X resource or command line argument.
       */
-      status=XParseColor(display,colormap,resource_info->alpha_color,
-        &pixel->alpha_color);
+      status=XParseColor(display,colormap,resource_info->matte_color,
+        &pixel->matte_color);
       if (status == False)
         ThrowXWindowException(XServerError,"ColorIsNotKnownToServer",
-          resource_info->alpha_color);
-      pixel->alpha_color.pixel=XStandardPixel(map_info,&pixel->alpha_color);
-      pixel->alpha_color.flags=(char) (DoRed | DoGreen | DoBlue);
+          resource_info->matte_color);
+      pixel->matte_color.pixel=XStandardPixel(map_info,&pixel->matte_color);
+      pixel->matte_color.flags=(char) (DoRed | DoGreen | DoBlue);
     }
   /*
     Set highlight color.
   */
   pixel->highlight_color.red=(unsigned short) (((double) 
-    pixel->alpha_color.red*ScaleQuantumToShort(HighlightModulate))/65535L+
+    pixel->matte_color.red*ScaleQuantumToShort(HighlightModulate))/65535L+
     (ScaleQuantumToShort((Quantum) (QuantumRange-HighlightModulate))));
   pixel->highlight_color.green=(unsigned short) (((double) 
-    pixel->alpha_color.green*ScaleQuantumToShort(HighlightModulate))/65535L+
+    pixel->matte_color.green*ScaleQuantumToShort(HighlightModulate))/65535L+
     (ScaleQuantumToShort((Quantum) (QuantumRange-HighlightModulate))));
   pixel->highlight_color.blue=(unsigned short) (((double) 
-    pixel->alpha_color.blue*ScaleQuantumToShort(HighlightModulate))/65535L+
+    pixel->matte_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);
@@ -3141,33 +3141,33 @@ MagickPrivate void XGetPixelInfo(Display *display,
     Set shadow color.
   */
   pixel->shadow_color.red=(unsigned short) (((double)
-    pixel->alpha_color.red*ScaleQuantumToShort(ShadowModulate))/65535L);
+    pixel->matte_color.red*ScaleQuantumToShort(ShadowModulate))/65535L);
   pixel->shadow_color.green=(unsigned short) (((double)
-    pixel->alpha_color.green*ScaleQuantumToShort(ShadowModulate))/65535L);
+    pixel->matte_color.green*ScaleQuantumToShort(ShadowModulate))/65535L);
   pixel->shadow_color.blue=(unsigned short) (((double)
-    pixel->alpha_color.blue*ScaleQuantumToShort(ShadowModulate))/65535L);
+    pixel->matte_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->alpha_color.red*ScaleQuantumToShort(DepthModulate))/65535L);
+    pixel->matte_color.red*ScaleQuantumToShort(DepthModulate))/65535L);
   pixel->depth_color.green=(unsigned short) (((double)
-    pixel->alpha_color.green*ScaleQuantumToShort(DepthModulate))/65535L);
+    pixel->matte_color.green*ScaleQuantumToShort(DepthModulate))/65535L);
   pixel->depth_color.blue=(unsigned short) (((double)
-    pixel->alpha_color.blue*ScaleQuantumToShort(DepthModulate))/65535L);
+    pixel->matte_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->alpha_color.red*ScaleQuantumToShort(TroughModulate))/65535L);
+    pixel->matte_color.red*ScaleQuantumToShort(TroughModulate))/65535L);
   pixel->trough_color.green=(unsigned short) (((double)
-    pixel->alpha_color.green*ScaleQuantumToShort(TroughModulate))/65535L);
+    pixel->matte_color.green*ScaleQuantumToShort(TroughModulate))/65535L);
   pixel->trough_color.blue=(unsigned short) (((double)
-    pixel->alpha_color.blue*ScaleQuantumToShort(TroughModulate))/65535L);
+    pixel->matte_color.blue*ScaleQuantumToShort(TroughModulate))/65535L);
   pixel->trough_color.pixel=XStandardPixel(map_info,&pixel->trough_color);
   pixel->trough_color.flags=(char) (DoRed | DoGreen | DoBlue);
   /*
@@ -3480,8 +3480,6 @@ MagickExport void XGetResourceInfo(const ImageInfo *image_info,
   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);
@@ -3572,6 +3570,8 @@ MagickExport void XGetResourceInfo(const ImageInfo *image_info,
   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",
@@ -7921,7 +7921,7 @@ MagickPrivate void XMakeStandardColormap(Display *display,
       (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->alpha_color);
+      (void) XAllocColor(display,colormap,&pixel->matte_color);
       (void) XAllocColor(display,colormap,&pixel->highlight_color);
       (void) XAllocColor(display,colormap,&pixel->shadow_color);
       (void) XAllocColor(display,colormap,&pixel->depth_color);
@@ -8256,7 +8256,7 @@ MagickPrivate void XMakeStandardColormap(Display *display,
       XBestPixel(display,colormap,colors,(unsigned int) number_colors,
         &pixel->border_color);
       XBestPixel(display,colormap,colors,(unsigned int) number_colors,
-        &pixel->alpha_color);
+        &pixel->matte_color);
       XBestPixel(display,colormap,colors,(unsigned int) number_colors,
         &pixel->highlight_color);
       XBestPixel(display,colormap,colors,(unsigned int) number_colors,
index 296e866bcdcc0f101e1d925c711507f82c38f550..fbfe5b5a878fb02e5f9e9f401c6b2c549cbf23f9 100644 (file)
@@ -209,7 +209,7 @@ static MagickBooleanType AnimateUsage(void)
   (void) printf(
     "resources as command line options:  -background, -bordercolor,\n");
   (void) printf(
-    "-alpha-color, -borderwidth, -font, -foreground, -iconGeometry,\n");
+    "-mattecolor, -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");
@@ -468,16 +468,6 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
                 "UnrecognizedAlphaChannelOption",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 == '+')
@@ -1063,6 +1053,16 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
           }
         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)
index 52c8188362c970a668364a77b433535d59b86a0a..d0c7aaf8f7787e603e8b4d1b664ac269c914234b 100644 (file)
@@ -363,7 +363,6 @@ static MagickBooleanType ConvertUsage(void)
       "-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",
@@ -416,6 +415,7 @@ static MagickBooleanType ConvertUsage(void)
       "-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",
@@ -706,15 +706,6 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
                 "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 == '+')
@@ -2120,6 +2111,15 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
           }
         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)
index a96eedbef2a4bd476e0e1fc3360a86ed6a55dcfc..9a747477eed5245bb6ac27ce6219d4a1244c6c34 100644 (file)
 #include "MagickCore/thread-private.h"
 \f
 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
-
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%   M a g i c k G e t I m a g e A l p h a C o l o r                           %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  MagickGetImageAlphaColor() returns the image alpha color.
+%
+%  The format of the MagickGetImageAlphaColor method is:
+%
+%      MagickBooleanType MagickGetImageAlphaColor(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 MagickGetImageAlphaColor(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->matte_color);
+  return(MagickTrue);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%   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->matte_color);
+  return(MagickTrue);
+}
 #endif
index c6e396b73d8cb379d4040611be15eedfcd21de07..2fc0edfa9ebff761b188d90bf0996e28018b9e73 100644 (file)
 extern "C" {
 #endif
 
+#include "MagickWand/pixel-wand.h"
+
 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
 
+extern WandExport MagickBooleanType
+  MagickGetImageAlphaColor(MagickWand *,PixelWand *),
+  MagickSetImageAlphaColor(MagickWand *,const PixelWand *);
+
 #endif
 
 #if defined(__cplusplus) || defined(c_plusplus)
index 337b133753dfae3f87acf3425b40bbc6796b91ef..f6fec078d64560c3ac35217d1991bbe377a9f134 100644 (file)
@@ -244,7 +244,7 @@ static MagickBooleanType DisplayUsage(void)
   (void) printf(
     "resources as command line options:  -background, -bordercolor,\n");
   (void) printf(
-    " -alpha-color, -borderwidth, -font, -foreground, -iconGeometry,\n");
+    " -mattecolor, -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");
@@ -1381,14 +1381,14 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
           }
         if (LocaleCompare("matte",option+1) == 0)
           break;
-        if (LocaleCompare("alpha-color",option+1) == 0)
+        if (LocaleCompare("mattecolor",option+1) == 0)
           {
             if (*option == '+')
               break;
             i++;
             if (i == (ssize_t) argc)
               ThrowDisplayException(OptionError,"MissingArgument",option);
-            resource_info.alpha_color=argv[i];
+            resource_info.matte_color=argv[i];
             break;
           }
         if (LocaleCompare("monitor",option+1) == 0)
index 3bb95759db5f2b64f5cbf6d6b6177bc6d32fdcc7..0a4eb385c325a4be076df17545f29837367b1894 100644 (file)
@@ -3386,7 +3386,7 @@ WandExport MagickBooleanType MagickForwardFourierTransformImage(
 %  The format of the MagickFrameImage method is:
 %
 %      MagickBooleanType MagickFrameImage(MagickWand *wand,
-%        const PixelWand *alpha_color,const size_t width,
+%        const PixelWand *matte_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 @@ WandExport MagickBooleanType MagickForwardFourierTransformImage(
 %
 %    o wand: the magick wand.
 %
-%    o alpha_color: the frame color pixel wand.
+%    o matte_color: the frame color pixel wand.
 %
 %    o width: the border width.
 %
@@ -3408,7 +3408,7 @@ WandExport MagickBooleanType MagickForwardFourierTransformImage(
 %
 */
 WandExport MagickBooleanType MagickFrameImage(MagickWand *wand,
-  const PixelWand *alpha_color,const size_t width,const size_t height,
+  const PixelWand *matte_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 @@ WandExport MagickBooleanType MagickFrameImage(MagickWand *wand,
   frame_info.y=(ssize_t) height;
   frame_info.inner_bevel=inner_bevel;
   frame_info.outer_bevel=outer_bevel;
-  PixelGetQuantumPacket(alpha_color,&wand->images->alpha_color);
+  PixelGetQuantumPacket(matte_color,&wand->images->matte_color);
   frame_image=FrameImage(wand->images,&frame_info,compose,wand->exception);
   if (frame_image == (Image *) NULL)
     return(MagickFalse);
@@ -3705,44 +3705,6 @@ WandExport MagickBooleanType MagickGetImageAlphaChannel(MagickWand *wand)
     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);
-}
 \f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5199,6 +5161,44 @@ WandExport MagickBooleanType MagickGetImageLength(MagickWand *wand,
 %                                                                             %
 %                                                                             %
 %                                                                             %
+%   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 alpha 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);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
 %   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                         %
 %                                                                             %
 %                                                                             %
@@ -9038,44 +9038,6 @@ WandExport MagickBooleanType MagickSetImageAlphaChannel(MagickWand *wand,
 %                                                                             %
 %                                                                             %
 %                                                                             %
-%   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);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
 %   M a g i c k S e t I m a g e B a c k g r o u n d C o l o r                 %
 %                                                                             %
 %                                                                             %
@@ -10127,6 +10089,44 @@ WandExport MagickBooleanType MagickSetImageMatte(MagickWand *wand,
 %                                                                             %
 %                                                                             %
 %                                                                             %
+%   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 alpha 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 alpha pixel wand.
+%
+*/
+WandExport MagickBooleanType MagickSetImageMatteColor(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->matte_color);
+  return(MagickTrue);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
 %   M a g i c k S e t I m a g e O p a c i t y                                 %
 %                                                                             %
 %                                                                             %
index bd31241bb52b0893d61cda5d2842c51250d019e8..e61bf8d62eef114c8d405a9997419ca62d8c0590 100644 (file)
@@ -111,8 +111,8 @@ extern WandExport MagickBooleanType
   MagickCommentImage(MagickWand *,const char *),
   MagickCompositeImage(MagickWand *,const MagickWand *,const CompositeOperator,
     const MagickBooleanType,const ssize_t,const ssize_t),
-  MagickCompositeImageGravity(MagickWand *,const MagickWand *,const CompositeOperator,
-    const GravityType),
+  MagickCompositeImageGravity(MagickWand *,const MagickWand *,
+    const CompositeOperator,const GravityType),
   MagickCompositeLayers(MagickWand *,const MagickWand *,const CompositeOperator,
     const ssize_t,const ssize_t),
   MagickConstituteImage(MagickWand *,const size_t,const size_t,const char *,
@@ -153,7 +153,6 @@ extern WandExport MagickBooleanType
   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 *),
@@ -165,6 +164,7 @@ extern WandExport MagickBooleanType
     double *),
   MagickGetImageGreenPrimary(MagickWand *,double *,double *,double *),
   MagickGetImageLength(MagickWand *,MagickSizeType *),
+  MagickGetImageMatteColor(MagickWand *,PixelWand *),
   MagickGetImagePage(MagickWand *,size_t *,size_t *,ssize_t *,
     ssize_t *),
   MagickGetImagePixelColor(MagickWand *,const ssize_t,const ssize_t,
@@ -245,7 +245,6 @@ extern WandExport MagickBooleanType
   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),
@@ -273,6 +272,7 @@ extern WandExport MagickBooleanType
   MagickSetImageInterpolateMethod(MagickWand *,const PixelInterpolateMethod),
   MagickSetImageIterations(MagickWand *,const size_t),
   MagickSetImageMatte(MagickWand *,const MagickBooleanType),
+  MagickSetImageMatteColor(MagickWand *,const PixelWand *),
   MagickSetImageOrientation(MagickWand *,const OrientationType),
   MagickSetImagePage(MagickWand *,const size_t,const size_t,const ssize_t,
     const ssize_t),
index 97bf3faf3b5df55f8f3589dbae53737978fac914..066d80bde7300881cb9e222971394616e0da39ee 100644 (file)
@@ -3643,7 +3643,6 @@ static MagickBooleanType MogrifyUsage(void)
       "-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",
@@ -3693,6 +3692,7 @@ static MagickBooleanType MogrifyUsage(void)
       "-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)",
@@ -4057,15 +4057,6 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
                 "UnrecognizedAlphaChannelOption",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 == '+')
@@ -5382,6 +5373,15 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
           }
         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)
@@ -6581,20 +6581,6 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
             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;
@@ -7229,6 +7215,20 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
             (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(MogrifyAlphaColor,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 == '+')
index be51df97d03ed8e1e585283d6289f5014697325e..34c7786d42a9dbf6ac784753bca2aee485ba9557 100644 (file)
@@ -132,7 +132,6 @@ static MagickBooleanType MontageUsage(void)
       "-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",
@@ -169,6 +168,7 @@ static MagickBooleanType MontageUsage(void)
       "-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 @@ static MagickBooleanType MontageUsage(void)
   (void) printf(
     "resources as command line options:  -background, -bordercolor,\n");
   (void) printf(
-    "-alpha-color, -borderwidth, -font, or -title\n");
+    "-mattecolor, -borderwidth, -font, or -title\n");
   (void) printf(
     "\nBy default, the image format of 'file' is determined by its magic\n");
   (void) printf(
@@ -466,21 +466,11 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowMontageException(OptionError,"MissingArgument",option);
-            type=ParseCommandOption(MagickAlphaChannelOptions,MagickFalse,argv[i]);
+            type=ParseCommandOption(MagickAlphaChannelOptions,MagickFalse,
+              argv[i]);
             if (type < 0)
-              ThrowMontageException(OptionError,"UnrecognizedAlphaChannelOption",
-                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);
+              ThrowMontageException(OptionError,
+                "UnrecognizedAlphaChannelOption",argv[i]);
             break;
           }
         if (LocaleCompare("annotate",option+1) == 0)
@@ -1210,6 +1200,17 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
       {
         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
index e0f514b89405c747ba23a266cfaa6574eb3cfdf2..0ee18225c90c16658cd80efaa38e48409e19b241 100644 (file)
@@ -486,14 +486,6 @@ WandPrivate void CLISettingOptionInfo(MagickCLI *cli_wand,
             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 =
@@ -1104,6 +1096,14 @@ WandPrivate void CLISettingOptionInfo(MagickCLI *cli_wand,
     }
     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(MogrifyAlphaColor),
+            AllCompliance,&_image_info->matte_color,_exception);
+          break;
+        }
       if (LocaleCompare("metric",option+1) == 0)
         {
           /* FUTURE: this is only used by CompareImages() which is used
index 662138d90dbd0d84806c59ac19125632f6119a6d..9ac125204a45229af0cee298d636e11950f5f07d 100644 (file)
@@ -1205,8 +1205,8 @@ static MagickBooleanType EncodeImageAttributes(Image *image,FILE *file,
       "      \"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->matte_color,MagickTrue,color);
+  (void) FormatLocaleFile(file,"    \"matteColor\": \"%s\",\n",color);
   GetColorTuple(&image->background_color,MagickTrue,color);
   (void) FormatLocaleFile(file,"    \"backgroundColor\": \"%s\",\n",color);
   GetColorTuple(&image->border_color,MagickTrue,color);
index e33eafbab87438bff922683d7759bd28f84d43ec..136c88ba363e06c38f7736390af448141cded075 100644 (file)
@@ -623,12 +623,6 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
               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
@@ -835,6 +829,12 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
                       BlendPixelTrait;
                     break;
                   }
+                if (LocaleCompare(keyword,"mattecolor") == 0)
+                  {
+                    (void) QueryColorCompliance(options,AllCompliance,
+                      &image->matte_color,exception);
+                    break;
+                  }
                 if (LocaleCompare(keyword,"montage") == 0)
                   {
                     (void) CloneString(&image->montage,options);
index e3e8641c368f9e470ecaf764d50d09b87a8b3a07..3a85d5597fee827c9740a7737b74f5c2550e5d4f 100644 (file)
@@ -339,12 +339,6 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
               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
@@ -537,6 +531,12 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                     signature=(unsigned int) StringToUnsignedLong(options);
                     break;
                   }
+                if (LocaleCompare(keyword,"mattecolor") == 0)
+                  {
+                    (void) QueryColorCompliance(options,AllCompliance,
+                      &image->matte_color,exception);
+                    break;
+                  }
                 if (LocaleCompare(keyword,"maximum-error") == 0)
                   {
                     image->error.normalized_maximum_error=StringToDouble(
index f95382ff04ed716bc6303ffea19f83434c84e303..86d2c26e1d69121a592d57fa8af76e8abdefaa7f 100644 (file)
@@ -3081,7 +3081,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword, "fill") == 0)
                     {
                       (void) QueryColorCompliance(value,AllCompliance,
-                        &msl_info->image[n]->alpha_color,exception);
+                        &msl_info->image[n]->matte_color,exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -7980,12 +7980,6 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
               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
@@ -8117,6 +8111,12 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
           (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;
     }