]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 15 Sep 2011 13:27:36 +0000 (13:27 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 15 Sep 2011 13:27:36 +0000 (13:27 +0000)
16 files changed:
Magick++/lib/Image.cpp
MagickCore/decorate.c
MagickCore/decorate.h
MagickCore/delegate.c
MagickCore/display.c
MagickCore/fx.c
MagickCore/magick-config.h
MagickCore/montage.c
MagickCore/shear.c
MagickCore/version.h
MagickWand/magick-image.c
MagickWand/magick-image.h
MagickWand/mogrify.c
PerlMagick/Magick.xs
coders/msl.c
coders/pcd.c

index 9ae4c158e4a4149f42b600ff7403bea0ec529ac9..1d53b7cbdcfeef935e84122deefbc6b86255fb7f 100644 (file)
@@ -515,7 +515,7 @@ void Magick::Image::border( const Geometry &geometry_ )
   ExceptionInfo exceptionInfo;
   GetExceptionInfo( &exceptionInfo );
   MagickCore::Image* newImage =
-    BorderImage( image(), &borderInfo, &exceptionInfo);
+    BorderImage( image(), &borderInfo, image()->compose, &exceptionInfo);
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -1126,7 +1126,7 @@ void Magick::Image::frame ( const Geometry &geometry_ )
   ExceptionInfo exceptionInfo;
   GetExceptionInfo( &exceptionInfo );
   MagickCore::Image* newImage =
-    FrameImage( image(), &info, &exceptionInfo );
+    FrameImage( image(), &info, image()->compose, &exceptionInfo );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -1146,7 +1146,7 @@ void Magick::Image::frame ( const size_t width_,
   ExceptionInfo exceptionInfo;
   GetExceptionInfo( &exceptionInfo );
   MagickCore::Image* newImage =
-    FrameImage( image(), &info, &exceptionInfo );
+    FrameImage( image(), &info, image()->compose, &exceptionInfo );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
index 4b8f3f431061f434667ed6079441963c5d47ced2..8cc3176ca1a8f896c592165fc304bc9951bc4226 100644 (file)
 %  The format of the BorderImage method is:
 %
 %      Image *BorderImage(const Image *image,const RectangleInfo *border_info,
-%        ExceptionInfo *exception)
+%        const CompositeOperator compose,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
 %    o image: the image.
 %
-%    o border_info:  Define the width and height of the border.
+%    o border_info:  define the width and height of the border.
+%
+%    o compose:  the composite operator.
 %
 %    o exception: return any errors or warnings in this structure.
 %
 */
 MagickExport Image *BorderImage(const Image *image,
-  const RectangleInfo *border_info,ExceptionInfo *exception)
+  const RectangleInfo *border_info,const CompositeOperator compose,
+  ExceptionInfo *exception)
 {
   Image
     *border_image,
@@ -122,7 +125,7 @@ MagickExport Image *BorderImage(const Image *image,
   if (clone_image == (Image *) NULL)
     return((Image *) NULL);
   clone_image->matte_color=image->border_color;
-  border_image=FrameImage(clone_image,&frame_info,exception);
+  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;
@@ -149,7 +152,7 @@ MagickExport Image *BorderImage(const Image *image,
 %  The format of the FrameImage method is:
 %
 %      Image *FrameImage(const Image *image,const FrameInfo *frame_info,
-%        ExceptionInfo *exception)
+%        const CompositeOperator compose,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -157,11 +160,13 @@ MagickExport Image *BorderImage(const Image *image,
 %
 %    o frame_info: Define the width and height of the frame and its bevels.
 %
+%    o compose: the composite operator.
+%
 %    o exception: return any errors or warnings in this structure.
 %
 */
 MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info,
-  ExceptionInfo *exception)
+  const CompositeOperator compose,ExceptionInfo *exception)
 {
 #define FrameImageTag  "Frame/Image"
 
@@ -425,8 +430,8 @@ MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info,
     /*
       Set frame interior to interior color.
     */
-    if ((image->compose != CopyCompositeOp) &&
-        ((image->compose != OverCompositeOp) || (image->matte != MagickFalse)))
+    if ((compose != CopyCompositeOp) && ((compose != OverCompositeOp) ||
+        (image->matte != MagickFalse)))
       for (x=0; x < (ssize_t) image->columns; x++)
       {
         SetPixelPixelInfo(frame_image,&interior,q);
@@ -584,14 +589,14 @@ MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info,
     }
   frame_view=DestroyCacheView(frame_view);
   image_view=DestroyCacheView(image_view);
-  if ((image->compose != CopyCompositeOp) &&
-      ((image->compose != OverCompositeOp) || (image->matte != MagickFalse)))
+  if ((compose != CopyCompositeOp) && ((compose != OverCompositeOp) ||
+      (image->matte != MagickFalse)))
     {
       x=(ssize_t) (frame_info->outer_bevel+(frame_info->x-bevel_width)+
         frame_info->inner_bevel);
       y=(ssize_t) (frame_info->outer_bevel+(frame_info->y-bevel_width)+
         frame_info->inner_bevel);
-      (void) CompositeImage(frame_image,image->compose,image,x,y);
+      (void) CompositeImage(frame_image,compose,image,x,y);
     }
   return(frame_image);
 }
index 30ba0887eb937759b6634d883f6ba2e599bbdd5d..4b8fdddf4ed4bdc6fbdb5018e944880e7341a87b 100644 (file)
@@ -38,8 +38,10 @@ typedef struct _FrameInfo
 } FrameInfo;
 
 extern MagickExport Image
-  *BorderImage(const Image *,const RectangleInfo *,ExceptionInfo *),
-  *FrameImage(const Image *,const FrameInfo *,ExceptionInfo *);
+  *BorderImage(const Image *,const RectangleInfo *,const CompositeOperator,
+    ExceptionInfo *),
+  *FrameImage(const Image *,const FrameInfo *,const CompositeOperator,
+    ExceptionInfo *);
 
 extern MagickExport MagickBooleanType
   RaiseImage(Image *,const RectangleInfo *,const MagickBooleanType,
index 5d77b19eb12262aab5a7297e5aee717b019b95a3..049b11d0e8517aa6043465cb0e5e8e096a4aab05 100644 (file)
@@ -96,8 +96,8 @@ static const char
     "  <delegate decode=\"https\" command=\"&quot;wget&quot; -q -O &quot;%o&quot; &quot;https:%M&quot;\"/>"
     "  <delegate decode=\"ilbm\" command=\"&quot;ilbmtoppm&quot; &quot;%i&quot; &gt; &quot;%o&quot;\"/>"
     "  <delegate decode=\"man\" command=\"&quot;groff&quot; -man -Tps &quot;%i&quot; &gt; &quot;%o&quot;\"/>"
-    "  <delegate decode=\"mpeg:decode\" stealth=\"True\" command=\"&quot;ffmpeg&quot; -v -1 -vframes %S -i &quot;%i&quot; -vcodec pam -an -f rawvideo -y &quot;%u.pam&quot; 2&gt; &quot;%Z&quot;\"/>"
-    "  <delegate decode=\"null\" encode=\"mpeg:encode\" stealth=\"True\" command=\"&quot;ffmpeg&quot; -v -1 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 300 -i &quot;%M%%d.jpg&quot; &quot;%u.%m&quot; 2&gt; &quot;%Z&quot;\"/>"
+    "  <delegate decode=\"mpeg:decode\" stealth=\"True\" command=\"&quot;ffmpeg&quot; -i &quot;%i&quot; -vcodec pam -an -f rawvideo -y &quot;%u0.pam&quot; 2;&gt; &quot;%Z&quot;\"/>"
+    "  <delegate decode=\"null\" encode=\"mpeg:encode\" stealth=\"True\" command=\"&quot;ffmpeg&quot; &quot;%M%%d.jpg&quot; &quot;%u.%m&quot; 2;&gt; &quot;%Z&quot;\"/>"
     "  <delegate decode=\"pcl:color\" stealth=\"True\" command=\"&quot;pcl6&quot; -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 &quot;-sDEVICE=ppmraw&quot; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &quot;-r%s&quot; %s &quot;-sOutputFile=%s&quot; &quot;%s&quot;\"/>"
     "  <delegate decode=\"pcl:cmyk\" stealth=\"True\" command=\"&quot;pcl6&quot; -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 &quot;-sDEVICE=bmpsep8&quot; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &quot;-r%s&quot; %s &quot;-sOutputFile=%s&quot; &quot;%s&quot;\"/>"
     "  <delegate decode=\"pcl:mono\" stealth=\"True\" command=\"&quot;pcl6&quot; -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 &quot;-sDEVICE=pbmraw&quot; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &quot;-r%s&quot; %s &quot;-sOutputFile=%s&quot; &quot;%s&quot;\"/>"
index b86406da22f17562d84dcd85096d0a8e54a4ba4e..555cbe699c0412b21922657828c2c9a0bafb18bc 100644 (file)
@@ -8861,7 +8861,8 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
         exception);
       (void) ParsePageGeometry(*image,geometry,&page_geometry,
         exception);
-      border_image=BorderImage(*image,&page_geometry,exception);
+      border_image=BorderImage(*image,&page_geometry,(*image)->compose,
+        exception);
       if (border_image != (Image *) NULL)
         {
           *image=DestroyImage(*image);
@@ -8917,7 +8918,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       frame_info.y=(ssize_t) frame_info.height;
       frame_info.width=(*image)->columns+2*frame_info.width;
       frame_info.height=(*image)->rows+2*frame_info.height;
-      frame_image=FrameImage(*image,&frame_info,exception);
+      frame_image=FrameImage(*image,&frame_info,(*image)->compose,exception);
       if (frame_image != (Image *) NULL)
         {
           *image=DestroyImage(*image);
index 7c741a52e38f284a29bad0715ca7c9b7404990e6..ac036f6953909090131084b75a94356b3292468b 100644 (file)
@@ -4163,7 +4163,7 @@ MagickExport Image *ShadowImage(const Image *image,const double opacity,
   border_info.x=0;
   border_info.y=0;
   (void) QueryColorDatabase("none",&clone_image->border_color,exception);
-  border_image=BorderImage(clone_image,&border_info,exception);
+  border_image=BorderImage(clone_image,&border_info,image->compose,exception);
   clone_image=DestroyImage(clone_image);
   if (border_image == (Image *) NULL)
     return((Image *) NULL);
index dd61047abad4137d55b899174a6c7450d40f7859..88c4ce4430a906e12ac95ccae46b45e34cb69605 100644 (file)
 #endif
 
 /* Define if you have the <lcms2.h> header file. */
-/* #undef HAVE_LCMS2_H */
+#ifndef MAGICKCORE_HAVE_LCMS2_H
+#define MAGICKCORE_HAVE_LCMS2_H 1
+#endif
 
 /* Define if you have the <lcms2/lcms2.h> header file. */
 /* #undef HAVE_LCMS2_LCMS2_H */
 
 /* Define if you have the <lcms.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS_H
-#define MAGICKCORE_HAVE_LCMS_H 1
-#endif
+/* #undef HAVE_LCMS_H */
 
 /* Define if you have the <lcms/lcms.h> header file. */
 /* #undef HAVE_LCMS_LCMS_H */
 #endif
 
 /* Define if you have JBIG library */
-#ifndef MAGICKCORE_JBIG_DELEGATE
-#define MAGICKCORE_JBIG_DELEGATE 1
-#endif
+/* #undef JBIG_DELEGATE */
 
 /* Define if you have JPEG version 2 "Jasper" library */
 #ifndef MAGICKCORE_JP2_DELEGATE
 #endif
 
 /* Define if you have LQR library */
-#ifndef MAGICKCORE_LQR_DELEGATE
-#define MAGICKCORE_LQR_DELEGATE 1
-#endif
+/* #undef LQR_DELEGATE */
 
 /* Define if using libltdl to support dynamically loadable modules */
 #ifndef MAGICKCORE_LTDL_DELEGATE
 
 /* Define to the system default library search path. */
 #ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/alliance/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/lib64/kicad:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mpich2/lib/:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/octave/3.4.2:/usr/lib64/openmotif:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
 #endif
 
 /* The archive extension */
 
 
 /* Define if you have WEBP library */
-#ifndef MAGICKCORE_WEBP_DELEGATE
-#define MAGICKCORE_WEBP_DELEGATE 1
-#endif
+/* #undef WEBP_DELEGATE */
 
 /* Define to use the Windows GDI32 library */
 /* #undef WINGDI32_DELEGATE */
 /* #undef X_DISPLAY_MISSING */
 
 /* Build self-contained, embeddable, zero-configuration ImageMagick */
-#ifndef MAGICKCORE_ZERO_CONFIGURATION_SUPPORT
-#define MAGICKCORE_ZERO_CONFIGURATION_SUPPORT 1
-#endif
+/* #undef ZERO_CONFIGURATION_SUPPORT */
 
 /* Define if you have zlib compression library */
 #ifndef MAGICKCORE_ZLIB_DELEGATE
index 8a112fe3836d1de4c15ce630fc6262a47b40cf49..95bba690c93b108013b967ee6849b4ada521205e 100644 (file)
@@ -750,7 +750,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
               border_info.width=(width-image->columns+1)/2;
               border_info.height=(height-image->rows+1)/2;
             }
-          border_image=BorderImage(image,&border_info,exception);
+          border_image=BorderImage(image,&border_info,image->compose,exception);
           if (border_image != (Image *) NULL)
             {
               image=DestroyImage(image);
@@ -795,7 +795,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
           if (value != (const char *) NULL)
             extract_info.height+=(size_t) ((metrics.ascent-
               metrics.descent+4)*MultilineCensus(value));
-          frame_image=FrameImage(image,&extract_info,exception);
+          frame_image=FrameImage(image,&extract_info,image->compose,exception);
           if (frame_image != (Image *) NULL)
             {
               image=DestroyImage(image);
index a36e0805df65b69b0bf5f084fc518e35e33414d5..4cc777203930efc9c6973e4cbef4e952edc77831 100644 (file)
@@ -1972,7 +1972,8 @@ MagickExport Image *RotateImage(const Image *image,const double degrees,
   integral_image->compose=CopyCompositeOp;
   border_info.width=(size_t) x_offset;
   border_info.height=(size_t) y_offset;
-  rotate_image=BorderImage(integral_image,&border_info,exception);
+  rotate_image=BorderImage(integral_image,&border_info,image->compose,
+    exception);
   integral_image=DestroyImage(integral_image);
   if (rotate_image == (Image *) NULL)
     ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
@@ -2117,7 +2118,7 @@ MagickExport Image *ShearImage(const Image *image,const double x_shear,
   integral_image->compose=CopyCompositeOp;
   border_info.width=(size_t) x_offset;
   border_info.height=(size_t) y_offset;
-  shear_image=BorderImage(integral_image,&border_info,exception);
+  shear_image=BorderImage(integral_image,&border_info,image->compose,exception);
   integral_image=DestroyImage(integral_image);
   if (shear_image == (Image *) NULL)
     ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
index 9b5d7d3fc1dce30f424c1150963e54696d31d0c3..6660995386e9d7bc38aa2327e23b5953c2b01641 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
 #define MagickLibAddendum  "-0"
 #define MagickLibInterface  7
 #define MagickLibMinInterface  7
-#define MagickReleaseDate  "2011-09-13"
+#define MagickReleaseDate  "2011-09-15"
 #define MagickChangeDate   "20110801"
 #define MagickAuthoritativeURL  "http://www.imagemagick.org"
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
index e8954483e2f23e9b76692a2e5ec7d8d2e4a325e8..793b16c12494b29e38ecdf4132b0391642bd49b4 100644 (file)
@@ -944,7 +944,7 @@ WandExport MagickBooleanType MagickBlurImage(MagickWand *wand,
 %
 %      MagickBooleanType MagickBorderImage(MagickWand *wand,
 %        const PixelWand *bordercolor,const size_t width,
-%        const size_t height)
+%        const size_t height,const CompositeOperator compose)
 %
 %  A description of each parameter follows:
 %
@@ -956,10 +956,12 @@ WandExport MagickBooleanType MagickBlurImage(MagickWand *wand,
 %
 %    o height: the border height.
 %
+%    o compose: the composite operator.
+%
 */
 WandExport MagickBooleanType MagickBorderImage(MagickWand *wand,
-  const PixelWand *bordercolor,const size_t width,
-  const size_t height)
+  const PixelWand *bordercolor,const size_t width,const size_t height,
+  const CompositeOperator compose)
 {
   Image
     *border_image;
@@ -978,7 +980,7 @@ WandExport MagickBooleanType MagickBorderImage(MagickWand *wand,
   border_info.x=0;
   border_info.y=0;
   PixelGetQuantumPacket(bordercolor,&wand->images->border_color);
-  border_image=BorderImage(wand->images,&border_info,wand->exception);
+  border_image=BorderImage(wand->images,&border_info,compose,wand->exception);
   if (border_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,border_image);
@@ -3141,7 +3143,7 @@ WandExport MagickBooleanType MagickForwardFourierTransformImage(
 %      MagickBooleanType MagickFrameImage(MagickWand *wand,
 %        const PixelWand *matte_color,const size_t width,
 %        const size_t height,const ssize_t inner_bevel,
-%        const ssize_t outer_bevel)
+%        const ssize_t outer_bevel,const CompositeOperator compose)
 %
 %  A description of each parameter follows:
 %
@@ -3157,10 +3159,13 @@ WandExport MagickBooleanType MagickForwardFourierTransformImage(
 %
 %    o outer_bevel: the outer bevel width.
 %
+%    o compose: the composite operator.
+%
 */
 WandExport MagickBooleanType MagickFrameImage(MagickWand *wand,
-  const PixelWand *matte_color,const size_t width,
-  const size_t height,const ssize_t inner_bevel,const ssize_t outer_bevel)
+  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)
 {
   Image
     *frame_image;
@@ -3182,7 +3187,7 @@ WandExport MagickBooleanType MagickFrameImage(MagickWand *wand,
   frame_info.inner_bevel=inner_bevel;
   frame_info.outer_bevel=outer_bevel;
   PixelGetQuantumPacket(matte_color,&wand->images->matte_color);
-  frame_image=FrameImage(wand->images,&frame_info,wand->exception);
+  frame_image=FrameImage(wand->images,&frame_info,compose,wand->exception);
   if (frame_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,frame_image);
index 9af4101455c7713cb006e58cee9123f5a24c08db..0fec2635ab6935e26445f7b898271b2f453b3ac4 100644 (file)
@@ -89,7 +89,8 @@ extern WandExport MagickBooleanType
   MagickBlackThresholdImage(MagickWand *,const PixelWand *),
   MagickBlueShiftImage(MagickWand *,const double),
   MagickBlurImage(MagickWand *,const double,const double,const double),
-  MagickBorderImage(MagickWand *,const PixelWand *,const size_t,const size_t),
+  MagickBorderImage(MagickWand *,const PixelWand *,const size_t,const size_t,
+    const CompositeOperator compose),
   MagickBrightnessContrastImage(MagickWand *,const double,const double),
   MagickCharcoalImage(MagickWand *,const double,const double,const double),
   MagickChopImage(MagickWand *,const size_t,const size_t,const ssize_t,
@@ -136,7 +137,7 @@ extern WandExport MagickBooleanType
   MagickFlopImage(MagickWand *),
   MagickForwardFourierTransformImage(MagickWand *,const MagickBooleanType),
   MagickFrameImage(MagickWand *,const PixelWand *,const size_t,const size_t,
-    const ssize_t,const ssize_t),
+    const ssize_t,const ssize_t,const CompositeOperator),
   MagickFunctionImage(MagickWand *,const MagickFunction,const size_t,
     const double *),
   MagickGammaImage(MagickWand *,const double),
index 34241782f1a1eff6e997b8870f197329678ab3b3..152cbc854e846b44906713e03afe8cdd57c0d1a6 100644 (file)
@@ -617,6 +617,9 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
   ChannelType
     channel;
 
+  CompositeOperator
+    compose;
+
   const char
     *format,
     *option;
@@ -672,6 +675,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
   SetGeometryInfo(&geometry_info);
   GetPixelInfo(*image,&fill);
   SetPixelInfoPacket(*image,&(*image)->background_color,&fill);
+  compose=(*image)->compose;
   interpolate_method=UndefinedInterpolatePixel;
   channel=mogrify_info->channel;
   format=GetImageOption(mogrify_info,"format");
@@ -923,7 +927,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             flags=ParsePageGeometry(*image,argv[i+1],&geometry,exception);
             if ((flags & SigmaValue) == 0)
               geometry.height=geometry.width;
-            mogrify_image=BorderImage(*image,&geometry,exception);
+            mogrify_image=BorderImage(*image,&geometry,compose,exception);
             break;
           }
         if (LocaleCompare("bordercolor",option+1) == 0)
@@ -1170,6 +1174,13 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             InheritException(exception,&(*image)->exception);
             break;
           }
+        if (LocaleCompare("compose",option+1) == 0)
+          {
+            (void) SyncImageSettings(mogrify_info,*image);
+            compose=(CompositeOperator) ParseCommandOption(MagickComposeOptions,
+              MagickFalse,argv[i+1]);
+            break;
+          }
         if (LocaleCompare("contrast",option+1) == 0)
           {
             (void) SyncImageSettings(mogrify_info,*image);
@@ -1624,7 +1635,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             frame_info.y=(ssize_t) frame_info.height;
             frame_info.width=(*image)->columns+2*frame_info.width;
             frame_info.height=(*image)->rows+2*frame_info.height;
-            mogrify_image=FrameImage(*image,&frame_info,exception);
+            mogrify_image=FrameImage(*image,&frame_info,compose,exception);
             break;
           }
         if (LocaleCompare("function",option+1) == 0)
index 42bc53a462e94013ece6d7f505b0a9ca2d9b8d4e..fb29f6fed5ccfe6babac73f1a264ee6306873f80 100644 (file)
@@ -7518,6 +7518,9 @@ Mogrify(ref,...)
         }
         case 5:  /* Border */
         {
+          CompositeOperator
+            compose;
+
           geometry.width=0;
           geometry.height=0;
           if (attribute_flag[0] != 0)
@@ -7540,9 +7543,10 @@ Mogrify(ref,...)
           if (attribute_flag[5] != 0)
             QueryColorDatabase(argument_list[5].string_reference,
               &image->border_color,exception);
+          compose=image->compose;
           if (attribute_flag[6] != 0)
-            image->compose=(CompositeOperator) argument_list[6].integer_reference;
-          image=BorderImage(image,&geometry,exception);
+            compose=(CompositeOperator) argument_list[6].integer_reference;
+          image=BorderImage(image,&geometry,compose,exception);
           break;
         }
         case 6:  /* Blur */
@@ -7653,6 +7657,9 @@ Mogrify(ref,...)
         }
         case 15:  /* Frame */
         {
+          CompositeOperator
+            compose;
+
           FrameInfo
             frame_info;
 
@@ -7687,10 +7694,10 @@ Mogrify(ref,...)
           frame_info.height=image->rows+2*frame_info.y;
           if ((attribute_flag[5] != 0) || (attribute_flag[6] != 0))
             image->matte_color=fill_color;
+          compose=image->compose;
           if (attribute_flag[7] != 0)
-            image->compose=(CompositeOperator)
-              argument_list[7].integer_reference;
-          image=FrameImage(image,&frame_info,exception);
+            compose=(CompositeOperator) argument_list[7].integer_reference;
+          image=FrameImage(image,&frame_info,compose,exception);
           break;
         }
         case 16:  /* Implode */
index a11f25ed52631c6cbe10c9cb21bed56996c6b4a1..220e48ce48e06ef44222bf5a6717a028c7819121 100644 (file)
@@ -1351,7 +1351,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           border_image=BorderImage(msl_info->image[n],&geometry,
-            &msl_info->image[n]->exception);
+            msl_info->image[n]->compose,&msl_info->image[n]->exception);
           if (border_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -3158,7 +3158,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           frame_info.width=msl_info->image[n]->columns+2*frame_info.x;
           frame_info.height=msl_info->image[n]->rows+2*frame_info.y;
           frame_image=FrameImage(msl_info->image[n],&frame_info,
-            &msl_info->image[n]->exception);
+            msl_info->image[n]->compose,&msl_info->image[n]->exception);
           if (frame_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
index 527821842cfa79a7477343ad1693b63d50fe03b9..4828eb382c5a319af623f203491d24faae774ad6 100644 (file)
@@ -1005,7 +1005,8 @@ static MagickBooleanType WritePCDTile(Image *image,const char *page_geometry,
       */
       border_info.width=(geometry.width-tile_image->columns+1) >> 1;
       border_info.height=(geometry.height-tile_image->rows+1) >> 1;
-      bordered_image=BorderImage(tile_image,&border_info,&image->exception);
+      bordered_image=BorderImage(tile_image,&border_info,image->compose,
+        &image->exception);
       if (bordered_image == (Image *) NULL)
         return(MagickFalse);
       tile_image=DestroyImage(tile_image);