Image
*canvas;
- SetPixelChannelMask(destination_image,channel_mask);
+ (void) SetPixelChannelMask(destination_image,channel_mask);
if ((channel_op == ExtractChannelOp) && (channels == 1))
(void) SetImageColorspace(destination_image,GRAYColorspace,exception);
status=SetImageStorageClass(destination_image,DirectClass,exception);
if (status == MagickFalse)
break;
}
- SetPixelChannelMask(destination_image,channel_mask);
+ (void) SetPixelChannelMask(destination_image,channel_mask);
if ((channel_op == ExtractChannelOp) && (channels == 1))
(void) SetImageColorspace(destination_image,GRAYColorspace,exception);
status=SetImageStorageClass(destination_image,DirectClass,exception);
{
channel=(PixelChannel) option;
channel_mask=(ChannelType) (channel_mask | (1 << channel));
- SetPixelChannelMask(image,channel_mask);
+ (void) SetPixelChannelMask(image,channel_mask);
}
}
(void) FormatLocaleString(key,MagickPathExtent,"%p.%.20g.%s",(void *) image,
if (value != (const char *) NULL)
{
if (channel_mask != UndefinedChannel)
- SetPixelChannelMask(image,channel_mask);
+ (void) SetPixelChannelMask(image,channel_mask);
return(QuantumScale*StringToDouble(value,(char **) NULL));
}
(void) DeleteNodeFromSplayTree(fx_info->symbols,key);
standard_deviation);
}
if (channel_mask != UndefinedChannel)
- SetPixelChannelMask(image,channel_mask);
+ (void) SetPixelChannelMask(image,channel_mask);
(void) AddValueToSplayTree(fx_info->symbols,ConstantString(key),
ConstantString(statistic));
return(QuantumScale*StringToDouble(statistic,(char **) NULL));
border_image=DestroyImage(border_image);
if (shadow_image == (Image *) NULL)
return((Image *) NULL);
- SetPixelChannelMask(shadow_image,channel_mask);
+ (void) SetPixelChannelMask(shadow_image,channel_mask);
if (shadow_image->page.width == 0)
shadow_image->page.width=shadow_image->columns;
if (shadow_image->page.height == 0)
MagickExport ChannelType SetImageChannelMask(Image *image,
const ChannelType channel_mask)
{
- ChannelType
- mask;
-
- mask=image->channel_mask;
- image->channel_mask=channel_mask;
- SetPixelChannelMask(image,channel_mask);
- return(mask);
+ return(SetPixelChannelMask(image,channel_mask));
}
\f
/*
if ((montage_info->frame != (char *) NULL) &&
(image->compose == DstOutCompositeOp))
{
- SetPixelChannelMask(image,AlphaChannel);
+ (void) SetPixelChannelMask(image,AlphaChannel);
(void) NegateImage(image,MagickFalse,exception);
- SetPixelChannelMask(image,DefaultChannels);
+ (void) SetPixelChannelMask(image,DefaultChannels);
}
}
/*
%
% The format of the SetPixelChannelMask method is:
%
-% void SetPixelChannelMask(Image *image,const ChannelType channel_mask)
+% ChannelType SetPixelChannelMask(Image *image,
+% const ChannelType channel_mask)
%
% A description of each parameter follows:
%
% o channel_mask: the channel mask.
%
*/
-MagickExport void SetPixelChannelMask(Image *image,
+MagickExport ChannelType SetPixelChannelMask(Image *image,
const ChannelType channel_mask)
{
#define GetChannelBit(mask,bit) (((size_t) (mask) >> (size_t) (bit)) & 0x01)
+ ChannelType
+ mask;
+
register ssize_t
i;
+ assert(image != (Image *) NULL);
+ assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(PixelEvent,GetMagickModule(),"%s[%08x]",
image->filename,channel_mask);
+ mask=image->channel_mask;
image->channel_mask=channel_mask;
for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
{
SetPixelChannelTraits(image,WriteMaskPixelChannel,CopyPixelTrait);
if (image->debug != MagickFalse)
LogPixelChannels(image);
+ return(mask);
}
\f
/*
/*
Pixel method declarations.
*/
+extern MagickExport ChannelType
+ SetPixelChannelMask(Image *,const ChannelType);
+
extern MagickExport MagickBooleanType
ExportImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
const size_t,const char *,const StorageType,void *,ExceptionInfo *),
extern MagickExport void
ConformPixelInfo(Image *,const PixelInfo *,PixelInfo *,ExceptionInfo *),
GetPixelInfo(const Image *,PixelInfo *),
- InitializePixelChannelMap(Image *),
- SetPixelChannelMask(Image *,const ChannelType);
+ InitializePixelChannelMap(Image *);
#if defined(__cplusplus) || defined(c_plusplus)
}
if (channel < 0)
ThrowCompareException(OptionError,"UnrecognizedChannelType",
argv[i]);
- SetPixelChannelMask(image,(ChannelType) channel);
+ (void) SetPixelChannelMask(image,(ChannelType) channel);
break;
}
if (LocaleCompare("colorspace",option+1) == 0)
% %
% %
% %
-% M a g i c k S e t I m a g e C l i p M a s k %
+% M a g i c k S e t I m a g e C h a n n e l M a s k %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% MagickSetImageChannelMask() sets image channel mask.
+%
+% The format of the MagickSetImageChannelMask method is:
+%
+% ChannelType MagickSetImageChannelMask(MagickWand *wand,
+% const ChannelType channel_mask)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+% o channel_mask: the channel_mask wand.
+%
+*/
+WandExport ChannelType MagickSetImageChannelMask(MagickWand *wand,
+ const ChannelType channel_mask)
+{
+ assert(wand != (MagickWand *) NULL);
+ assert(wand->signature == WandSignature);
+ if (IfMagickTrue(wand->debug))
+ (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
+ return(SetImageChannelMask(wand->images,channel_mask));
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% M a g i c k S e t I m a g e M a s k %
% %
% %
% %
extern WandExport ChannelFeatures
*MagickGetImageFeatures(MagickWand *,const size_t);
+extern WandExport ChannelType
+ MagickSetImageChannelMask(MagickWand *,const ChannelType);
+
extern WandExport ChannelStatistics
*MagickGetImageStatistics(MagickWand *);
(void) SyncImageSettings(mogrify_info,*image,exception);
if (*option == '+')
{
- SetPixelChannelMask(*image,DefaultChannels);
+ (void) SetPixelChannelMask(*image,DefaultChannels);
break;
}
channel=(ChannelType) ParseChannelOption(argv[i+1]);
- SetPixelChannelMask(*image,channel);
+ (void) SetPixelChannelMask(*image,channel);
break;
}
if (LocaleCompare("charcoal",option+1) == 0)
{
if (IfPlusOp)
{
- SetPixelChannelMask(_image,DefaultChannels);
+ (void) SetPixelChannelMask(_image,DefaultChannels);
break;
}
parse=ParseChannelOption(arg1);
if (parse < 0)
CLIWandExceptArgBreak(OptionError,"UnrecognizedIntensityMethod",
option,arg1);
- SetPixelChannelMask(_image,(ChannelType) parse);
+ (void) SetPixelChannelMask(_image,(ChannelType) parse);
break;
}
if (LocaleCompare("charcoal",option+1) == 0)
"UnrecognizedType",SvPV(ST(i),na));
return;
}
- SetPixelChannelMask(image,(ChannelType) option);
+ (void) SetPixelChannelMask(image,(ChannelType) option);
break;
}
ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
SvPV(ST(i),na));
return;
}
- SetPixelChannelMask(image,(ChannelType) option);
+ (void) SetPixelChannelMask(image,(ChannelType) option);
break;
}
ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
"UnrecognizedType",SvPV(ST(i),na));
return;
}
- SetPixelChannelMask(image,(ChannelType) option);
+ (void) SetPixelChannelMask(image,(ChannelType) option);
break;
}
ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
SvPV(ST(i),na));
return;
}
- SetPixelChannelMask(image,(ChannelType) option);
+ (void) SetPixelChannelMask(image,(ChannelType) option);
break;
}
ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",