From ddf87b61f03e7ca1245508a57d5734c31ac7d7eb Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 21 Mar 2012 21:00:20 +0000 Subject: [PATCH] --- MagickCore/channel.c | 7 +++++-- MagickCore/channel.h | 2 +- MagickWand/mogrify.c | 2 +- MagickWand/operation.c | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/MagickCore/channel.c b/MagickCore/channel.c index 05d0e0eee..45c46dff7 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -730,17 +730,20 @@ MagickExport Image *SeparateImage(const Image *image, % % The format of the SeparateImages method is: % -% MagickBooleanType SeparateImages(const Image *image, +% Image *SeparateImages(const Image *image,const ChannelType channels, % 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,ExceptionInfo *exception) +MagickExport Image *SeparateImages(const Image *image, + const ChannelType channels,ExceptionInfo *exception) { Image *images, diff --git a/MagickCore/channel.h b/MagickCore/channel.h index 46cb11b88..e795feba3 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 *,ExceptionInfo *); + *SeparateImages(const Image *,const ChannelType,ExceptionInfo *); extern MagickExport MagickBooleanType GetImageAlphaChannel(const Image *), diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index 9f8fb40cd..d6c904d1b 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,exception); + mogrify_image=SeparateImages(*image,image_info->channel,exception); break; } if (LocaleCompare("sepia-tone",option+1) == 0) diff --git a/MagickWand/operation.c b/MagickWand/operation.c index 25396af71..f48ccc486 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -1917,8 +1917,8 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand, /* The "channel" setting has already been set FUTURE: This probably should be part of SyncImageSettings(). How is it applied to new images? - */ SetPixelChannelMapMask(_image,_image_info->channel); + */ break; } if (LocaleCompare("charcoal",option+1) == 0) @@ -3088,7 +3088,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,_exception); + new_image=SeparateImages(_image,_image_info->channel,_exception); break; } if (LocaleCompare("sepia-tone",option+1) == 0) -- 2.40.0