% MagickCore Image Channel Methods %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% December 2003 %
% %
% %
-% Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
*/
#include "MagickCore/studio.h"
#include "MagickCore/cache-private.h"
+#include "MagickCore/channel.h"
#include "MagickCore/colorspace-private.h"
#include "MagickCore/composite-private.h"
#include "MagickCore/enhance.h"
channel_op=ExtractChannelOp;
for (channels=0; *token != '\0'; )
{
- MagickBooleanType
- delete_channel;
-
ssize_t
i;
/*
Interpret channel expression.
*/
- delete_channel=MagickFalse;
switch (*token)
{
- case '~':
- {
- delete_channel=MagickTrue;
- GetMagickToken(p,&p,token);
- break;
- }
case ',':
{
- destination_channel=(PixelChannel) ((ssize_t) destination_channel+1);
GetMagickToken(p,&p,token);
break;
}
{
case ExtractChannelOp:
{
- if (delete_channel == MagickFalse)
- channel_mask=(ChannelType) (channel_mask |
- (1 << destination_channel));
- else
- channel_mask=(ChannelType) (channel_mask &~
- (1 << destination_channel));
+ channel_mask=(ChannelType) (channel_mask | (1 << destination_channel));
destination_channel=(PixelChannel) (destination_channel+1);
break;
}
if (GetPixelReadMask(image,p) == 0)
{
+ SetPixelBackgoundColor(separate_image,q);
p+=GetPixelChannels(image);
q+=GetPixelChannels(separate_image);
continue;