From: cristy Date: Mon, 27 May 2013 14:13:40 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3634 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b496b77c5fa39041d03d7c28fe601a4a8d5d625f;p=imagemagick --- diff --git a/MagickCore/channel.c b/MagickCore/channel.c index 57b5b36f1..61c1f0e92 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -354,6 +354,33 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, break; } case ExchangeChannelOp: + { + PixelChannelMap + channel_map; + + i=ParsePixelChannelOption(token); + if (i < 0) + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "UnrecognizedChannelType","`%s'",token); + destination_image=DestroyImageList(destination_image); + return(destination_image); + } + destination_channel=(PixelChannel) i; + if ((source_channel >= GetPixelChannels(image)) || + (destination_channel >= GetPixelChannels(image))) + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "NoSuchImageChannel","`%s'",token); + destination_image=DestroyImageList(destination_image); + return(destination_image); + } + channel_map=destination_image->channel_map[destination_channel]; + destination_image->channel_map[destination_channel]= + destination_image->channel_map[source_channel]; + destination_image->channel_map[source_channel]=channel_map; + break; + } case TransferChannelOp: { i=ParsePixelChannelOption(token); diff --git a/coders/matte.c b/coders/matte.c index b0ee884c8..de773351b 100644 --- a/coders/matte.c +++ b/coders/matte.c @@ -176,7 +176,7 @@ static MagickBooleanType WriteMATTEImage(const ImageInfo *image_info, y; if (image->alpha_trait != BlendPixelTrait) - ThrowWriterException(CoderError,"ImageDoesNotHaveAAlphaChannel"); + ThrowWriterException(CoderError,"ImageDoesNotHaveAnAlphaChannel"); matte_image=CloneImage(image,image->columns,image->rows,MagickTrue,exception); if (matte_image == (Image *) NULL) return(MagickFalse); diff --git a/config/english.xml b/config/english.xml index 302bd0ae0..2e60ea279 100644 --- a/config/english.xml +++ b/config/english.xml @@ -110,8 +110,8 @@ image does not have a clip mask - - image does not have a alpha channel + + image does not have an alpha channel image does not have a EXIF thumbnail @@ -692,6 +692,9 @@ no such image + + no such image channel + no such option diff --git a/config/francais.xml b/config/francais.xml index 6e2e9447e..9b5c83172 100644 --- a/config/francais.xml +++ b/config/francais.xml @@ -110,7 +110,7 @@ image sans vignette EXIF - + l'image n'a pas de canal de transparence @@ -689,6 +689,9 @@ image inconnue + + image channel inconnue + option inconnue