From dfdb19ea2c08296b31fef860352c0a6efe8e9cc6 Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 21 Mar 2012 22:22:24 +0000 Subject: [PATCH] --- MagickCore/channel.c | 12 ++++------ MagickCore/channel.h | 2 +- MagickCore/image.c | 3 +++ MagickCore/magick-config.h | 46 ++++++++++++++++++++++++++------------ MagickCore/pixel.c | 2 +- MagickCore/version.h | 4 ++-- MagickWand/convert.c | 2 +- MagickWand/mogrify.c | 6 +++-- MagickWand/operation.c | 5 ++++- 9 files changed, 52 insertions(+), 30 deletions(-) diff --git a/MagickCore/channel.c b/MagickCore/channel.c index 45c46dff7..111a33978 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -358,8 +358,8 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, if (LocaleCompare(token,"alpha") == 0) (void) SetImageAlpha(destination_image,OpaqueAlpha,exception); if (i >= (ssize_t) GetPixelChannels(destination_image)) - (void) SetPixelMetaChannels(destination_image,i- - GetPixelChannels(destination_image)+1,exception); + (void) SetPixelMetaChannels(destination_image,(size_t) (i- + GetPixelChannels(destination_image)+1),exception); GetMagickToken(p,&p,token); break; } @@ -730,20 +730,16 @@ MagickExport Image *SeparateImage(const Image *image, % % The format of the SeparateImages method is: % -% Image *SeparateImages(const Image *image,const ChannelType channels, -% ExceptionInfo *exception) +% Image *SeparateImages(const Image *image,ExceptionInfo *exception) % % A description of each parameter follows: % % o image: the image. % -% o channels: the image channels. -% % o exception: return any errors or warnings in this structure. % */ -MagickExport Image *SeparateImages(const Image *image, - const ChannelType channels,ExceptionInfo *exception) +MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception) { Image *images, diff --git a/MagickCore/channel.h b/MagickCore/channel.h index e795feba3..46cb11b88 100644 --- a/MagickCore/channel.h +++ b/MagickCore/channel.h @@ -26,7 +26,7 @@ extern MagickExport Image *ChannelFxImage(const Image *,const char *,ExceptionInfo *), *CombineImages(const Image *,ExceptionInfo *), *SeparateImage(const Image *,const ChannelType,ExceptionInfo *), - *SeparateImages(const Image *,const ChannelType,ExceptionInfo *); + *SeparateImages(const Image *,ExceptionInfo *); extern MagickExport MagickBooleanType GetImageAlphaChannel(const Image *), diff --git a/MagickCore/image.c b/MagickCore/image.c index f5fe9c518..cdc3c0ebf 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -3873,6 +3873,9 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, if (option != (const char *) NULL) (void) QueryColorCompliance(option,AllCompliance,&image->border_color, exception); + option=GetImageOption(image_info,"channel"); + if (option != (const char *) NULL) + (void) SetPixelChannelMapMask(image,ParseChannelOption(option)); /* FUTURE: do not sync compose to per-image compose setting here */ option=GetImageOption(image_info,"compose"); if (option != (const char *) NULL) diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index 6c325993c..db62b5f5a 100644 --- a/MagickCore/magick-config.h +++ b/MagickCore/magick-config.h @@ -12,7 +12,9 @@ /* #undef AUTOTRACE_DELEGATE */ /* Define if coders and filters are to be built as modules. */ -/* #undef BUILD_MODULES */ +#ifndef MAGICKCORE_BUILD_MODULES +#define MAGICKCORE_BUILD_MODULES 1 +#endif /* Define if you have the bzip2 library */ #ifndef MAGICKCORE_BZLIB_DELEGATE @@ -95,7 +97,9 @@ #endif /* Define if you have FlashPIX library */ -/* #undef FPX_DELEGATE */ +#ifndef MAGICKCORE_FPX_DELEGATE +#define MAGICKCORE_FPX_DELEGATE 1 +#endif /* Define if you have FreeType (TrueType font) library */ #ifndef MAGICKCORE_FREETYPE_DELEGATE @@ -219,7 +223,9 @@ #endif /* Define to 1 if you have the header file. */ -/* #undef HAVE_CL_CL_H */ +#ifndef MAGICKCORE_HAVE_CL_CL_H +#define MAGICKCORE_HAVE_CL_CL_H 1 +#endif /* Define to 1 if you have the header file. */ #ifndef MAGICKCORE_HAVE_COMPLEX_H @@ -442,15 +448,15 @@ #endif /* Define if you have the header file. */ -#ifndef MAGICKCORE_HAVE_LCMS2_H -#define MAGICKCORE_HAVE_LCMS2_H 1 -#endif +/* #undef HAVE_LCMS2_H */ /* Define if you have the header file. */ /* #undef HAVE_LCMS2_LCMS2_H */ /* Define if you have the header file. */ -/* #undef HAVE_LCMS_H */ +#ifndef MAGICKCORE_HAVE_LCMS_H +#define MAGICKCORE_HAVE_LCMS_H 1 +#endif /* Define if you have the header file. */ /* #undef HAVE_LCMS_LCMS_H */ @@ -1188,7 +1194,9 @@ #endif /* Define if you have JBIG library */ -/* #undef JBIG_DELEGATE */ +#ifndef MAGICKCORE_JBIG_DELEGATE +#define MAGICKCORE_JBIG_DELEGATE 1 +#endif /* Define if you have JPEG version 2 "Jasper" library */ #ifndef MAGICKCORE_JP2_DELEGATE @@ -1217,7 +1225,9 @@ #endif /* Define if you have LQR library */ -/* #undef LQR_DELEGATE */ +#ifndef MAGICKCORE_LQR_DELEGATE +#define MAGICKCORE_LQR_DELEGATE 1 +#endif /* Define if using libltdl to support dynamically loadable modules */ #ifndef MAGICKCORE_LTDL_DELEGATE @@ -1229,7 +1239,7 @@ /* Define to the system default library search path. */ #ifndef MAGICKCORE_LT_DLSEARCH_PATH -#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib64/tracker-0.12:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2" +#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/usr/lib64/freetype-freeworld:/opt/modules/pkg/intel/f77/10.0.025/lib:/opt/intel/lib/intel64:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/openmotif:/usr/lib64/qt-3.3/lib:/usr/lib64/tracker-0.12:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2" #endif /* The archive extension */ @@ -1283,7 +1293,9 @@ /* #undef NO_MINUS_C_MINUS_O */ /* Define if you have OPENEXR library */ -/* #undef OPENEXR_DELEGATE */ +#ifndef MAGICKCORE_OPENEXR_DELEGATE +#define MAGICKCORE_OPENEXR_DELEGATE 1 +#endif /* Name of package */ #ifndef MAGICKCORE_PACKAGE @@ -1511,7 +1523,9 @@ #endif /* Define if you have WEBP library */ -/* #undef WEBP_DELEGATE */ +#ifndef MAGICKCORE_WEBP_DELEGATE +#define MAGICKCORE_WEBP_DELEGATE 1 +#endif /* Define to use the Windows GDI32 library */ /* #undef WINGDI32_DELEGATE */ @@ -1520,7 +1534,9 @@ /* #undef WITH_DMALLOC */ /* Define if you have wmflite library */ -/* #undef WMFLITE_DELEGATE */ +#ifndef MAGICKCORE_WMFLITE_DELEGATE +#define MAGICKCORE_WMFLITE_DELEGATE 1 +#endif /* Define if you have wmf library */ /* #undef WMF_DELEGATE */ @@ -1579,7 +1595,9 @@ /* #undef _MINIX */ /* Define this for the OpenCL Accelerator */ -/* #undef _OPENCL */ +#ifndef MAGICKCORE__OPENCL +#define MAGICKCORE__OPENCL 1 +#endif /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c index 2f38dea1c..93a528e29 100644 --- a/MagickCore/pixel.c +++ b/MagickCore/pixel.c @@ -5644,7 +5644,7 @@ MagickExport MagickBooleanType IsFuzzyEquivalencePixelInfo(const PixelInfo *p, % % o image: the image. % -% o mask: the channel mask. +% o channel_mask: the channel mask. % */ MagickExport void SetPixelChannelMapMask(Image *image, diff --git a/MagickCore/version.h b/MagickCore/version.h index 17c3eca38..3284079ef 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,14 +27,14 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2012 ImageMagick Studio LLC" -#define MagickSVNRevision "7178" +#define MagickSVNRevision "exported" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 #define MagickLibAddendum "-0" #define MagickLibInterface 7 #define MagickLibMinInterface 7 -#define MagickReleaseDate "2012-03-20" +#define MagickReleaseDate "2012-03-21" #define MagickChangeDate "20110801" #define MagickAuthoritativeURL "http://www.imagemagick.org" #if defined(MAGICKCORE_OPENMP_SUPPORT) diff --git a/MagickWand/convert.c b/MagickWand/convert.c index fdb6e3398..86cd4dc7a 100644 --- a/MagickWand/convert.c +++ b/MagickWand/convert.c @@ -139,6 +139,7 @@ static MagickBooleanType ConvertUsage(void) { "-channel-fx expression", " exchange, extract, or transfer one or more image channels", + "-separate separate an image channel into a grayscale image", (char *) NULL }, *miscellaneous[]= @@ -322,7 +323,6 @@ static MagickBooleanType ConvertUsage(void) "-mosaic create a mosaic from an image sequence", "-print string interpret string and print to console", "-process arguments process the image with a custom image filter", - "-separate separate an image channel into a grayscale image", "-smush geometry smush an image sequence together", "-write filename write images to this file", (char *) NULL diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index d6c904d1b..08b461678 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -2614,7 +2614,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, Break channels into separate images. */ (void) SyncImageSettings(mogrify_info,*image,exception); - mogrify_image=SeparateImages(*image,image_info->channel,exception); + mogrify_image=SeparateImages(*image,exception); break; } if (LocaleCompare("sepia-tone",option+1) == 0) @@ -3259,6 +3259,7 @@ static MagickBooleanType MogrifyUsage(void) { "-channel-fx expression", " exchange, extract, or transfer one or more image channels", + "-separate separate an image channel into a grayscale image", (char *) NULL }, *miscellaneous[]= @@ -3442,7 +3443,6 @@ static MagickBooleanType MogrifyUsage(void) "-mosaic create a mosaic from an image sequence", "-print string interpret string and print to console", "-process arguments process the image with a custom image filter", - "-separate separate an image channel into a grayscale image", "-smush geometry smush an image sequence together", "-write filename write images to this file", (char *) NULL @@ -6288,9 +6288,11 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info, if (*option == '+') { image_info->channel=DefaultChannels; + (void) SetImageOption(image_info,option+1,"default"); break; } image_info->channel=(ChannelType) ParseChannelOption(argv[i+1]); + (void) SetImageOption(image_info,option+1,argv[i+1]); break; } if (LocaleCompare("colorspace",option+1) == 0) diff --git a/MagickWand/operation.c b/MagickWand/operation.c index f48ccc486..ef72e3c85 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -776,6 +776,9 @@ WandExport void CLISettingOptionInfo(MagickCLI *cli_wand, if (channel < 0) CLIWandExceptArgBreak(OptionError,"UnrecognizedChannelType", option,arg1); + (void) SetImageOption(_image_info,option+1,arg1); + } else { + (void) SetImageOption(_image_info,option+1,"default"); } _image_info->channel=(ChannelType) channel; break; @@ -3088,7 +3091,7 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand, { /* WARNING: This can generate multiple images! */ /* FUTURE - this may be replaced by a "-channel" method */ - new_image=SeparateImages(_image,_image_info->channel,_exception); + new_image=SeparateImages(_image,_exception); break; } if (LocaleCompare("sepia-tone",option+1) == 0) -- 2.40.0