ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
MagickCore::Image* newImage =
- BorderImage( image(), &borderInfo, &exceptionInfo);
+ BorderImage( image(), &borderInfo, image()->compose, &exceptionInfo);
replaceImage( newImage );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
MagickCore::Image* newImage =
- FrameImage( image(), &info, &exceptionInfo );
+ FrameImage( image(), &info, image()->compose, &exceptionInfo );
replaceImage( newImage );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
MagickCore::Image* newImage =
- FrameImage( image(), &info, &exceptionInfo );
+ FrameImage( image(), &info, image()->compose, &exceptionInfo );
replaceImage( newImage );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
% 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,
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;
% 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:
%
%
% 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"
/*
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);
}
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);
}
} 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,
" <delegate decode=\"https\" command=\""wget" -q -O "%o" "https:%M"\"/>"
" <delegate decode=\"ilbm\" command=\""ilbmtoppm" "%i" > "%o"\"/>"
" <delegate decode=\"man\" command=\""groff" -man -Tps "%i" > "%o"\"/>"
- " <delegate decode=\"mpeg:decode\" stealth=\"True\" command=\""ffmpeg" -v -1 -vframes %S -i "%i" -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z"\"/>"
- " <delegate decode=\"null\" encode=\"mpeg:encode\" stealth=\"True\" command=\""ffmpeg" -v -1 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 300 -i "%M%%d.jpg" "%u.%m" 2> "%Z"\"/>"
+ " <delegate decode=\"mpeg:decode\" stealth=\"True\" command=\""ffmpeg" -i "%i" -vcodec pam -an -f rawvideo -y "%u0.pam" 2;> "%Z"\"/>"
+ " <delegate decode=\"null\" encode=\"mpeg:encode\" stealth=\"True\" command=\""ffmpeg" "%M%%d.jpg" "%u.%m" 2;> "%Z"\"/>"
" <delegate decode=\"pcl:color\" stealth=\"True\" command=\""pcl6" -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s"\"/>"
" <delegate decode=\"pcl:cmyk\" stealth=\"True\" command=\""pcl6" -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=bmpsep8" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s"\"/>"
" <delegate decode=\"pcl:mono\" stealth=\"True\" command=\""pcl6" -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pbmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s"\"/>"
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);
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);
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);
#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
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);
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);
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");
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");
#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)
%
% 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:
%
%
% 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;
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);
% 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:
%
%
% 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;
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);
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,
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),
ChannelType
channel;
+ CompositeOperator
+ compose;
+
const char
*format,
*option;
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");
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)
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);
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)
}
case 5: /* Border */
{
+ CompositeOperator
+ compose;
+
geometry.width=0;
geometry.height=0;
if (attribute_flag[0] != 0)
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 */
}
case 15: /* Frame */
{
+ CompositeOperator
+ compose;
+
FrameInfo
frame_info;
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 */
}
}
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]);
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]);
*/
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);