border_image=DestroyImage(border_image);
if (shadow_image == (Image *) NULL)
return((Image *) NULL);
- (void) SetPixelChannelMask(shadow_image,channel_mask);
+ SetPixelChannelMask(shadow_image,channel_mask);
if (shadow_image->page.width == 0)
shadow_image->page.width=shadow_image->columns;
if (shadow_image->page.height == 0)
{
PixelChannel channel=GetPixelChannelChannel(image,i);
PixelTrait traits=GetPixelChannelTraits(image,channel);
- if ((traits == UndefinedPixelTrait) || ((traits & CopyPixelTrait) != 0))
+ if ((traits & UpdatePixelTrait) == 0)
continue;
if ((double) q[i] > threshold)
q[i]=QuantumRange-q[i];
if (option != (const char *) NULL)
(void) QueryColorCompliance(option,AllCompliance,&image->border_color,
exception);
- option=GetImageOption(image_info,"channel");
- if (option != (const char *) NULL)
- (void) SetPixelChannelMask(image,(ChannelType) ParseChannelOption(option));
/* FUTURE: do not sync compose to per-image compose setting here */
option=GetImageOption(image_info,"compose");
if (option != (const char *) NULL)
{ "-caption", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
{ "+cdl", 1L, DeprecateOptionFlag, MagickTrue },
{ "-cdl", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
- { "+channel", 0L, ImageInfoOptionFlag, MagickFalse },
- { "-channel", 1L, ImageInfoOptionFlag, MagickFalse },
+ { "+channel", 0L, SimpleOperatorFlag, MagickFalse },
+ { "-channel", 1L, SimpleOperatorFlag, MagickFalse },
{ "-channel-fx", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
{ "+charcoal", 1L, DeprecateOptionFlag, MagickTrue },
{ "-charcoal", 1L, SimpleOperatorFlag, MagickFalse },
{ "-geometry", 1L, SimpleOperatorFlag, MagickFalse },
{ "+gravity", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
{ "-gravity", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
- { "-grayscale", 1L, SimpleOperatorFlag, MagickFalse },
{ "+grayscale", 1L, SimpleOperatorFlag, MagickTrue },
+ { "-grayscale", 1L, SimpleOperatorFlag, MagickFalse },
{ "+green-primary", 0L, ImageInfoOptionFlag, MagickFalse },
{ "-green-primary", 1L, ImageInfoOptionFlag, MagickFalse },
{ "+hald-clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
{ "-motion-blur", 1L, SimpleOperatorFlag, MagickFalse },
{ "+name", 0L, NonMagickOptionFlag, MagickFalse },
{ "-name", 1L, NonMagickOptionFlag, MagickFalse },
- { "-negate", 0L, SimpleOperatorFlag, MagickFalse },
{ "+negate", 0L, SimpleOperatorFlag, MagickFalse },
+ { "-negate", 0L, SimpleOperatorFlag, MagickFalse },
{ "-noise", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickFalse },
{ "+noise", 1L, SimpleOperatorFlag, MagickFalse },
{ "-noop", 0L, NoImageOperatorFlag, MagickFalse },
image->number_channels=(size_t) n;
if (image->debug != MagickFalse)
LogPixelChannels(image);
- (void) SetImageChannelMask(image,image->channel_mask);
+ SetImageChannelMask(image,image->channel_mask);
}
\f
/*
},
*operators[]=
{
+ "-channel mask set the image channel mask",
"-colors value preferred number of colors in the image",
"-crop geometry preferred size and location of the cropped image",
"-extract geometry extract area from image",
"-authenticate password",
" decipher image with this password",
"-backdrop display image centered on a backdrop",
- "-channel type apply option to select image channels",
"-colormap type Shared or Private",
"-colorspace type alternate image colorspace",
"-decipher filename convert cipher pixels to plain pixels",
static const char
*miscellaneous[]=
{
+ "-channel mask set the image channel mask",
"-debug events display copious debugging information",
"-help print program options",
"-list type print a list of supported option arguments",
" transparent, extract, background, or shape",
"-authenticate password",
" decipher image with this password",
- "-channel type apply option to select image channels",
"-colorspace type alternate image colorspace",
"-compose operator set image composite operator",
"-compress type type of pixel compression when writing the image",
"-blend geometry blend images",
"-border geometry surround image with a border of color",
"-bordercolor color border color",
+ "-channel mask set the image channel mask",
"-colors value preferred number of colors in the image",
"-decipher filename convert cipher pixels to plain pixels",
"-displace geometry shift lookup according to a relative displacement map",
"-authenticate password",
" decipher image with this password",
"-blue-primary point chromaticity blue primary point",
- "-channel type apply option to select image channels",
"-colorspace type alternate image colorspace",
"-comment string annotate image with comment",
"-compose operator composite operator",
" improve brightness / contrast of the image",
"-canny geometry detect edges in the image",
"-cdl filename color correct with a color decision list",
+ "-channel mask set the image channel mask",
"-charcoal radius simulate a charcoal drawing",
"-chop geometry remove pixels from the image interior",
"-clamp keep pixel values in range (0-QuantumRange)",
"-blue-primary point chromaticity blue primary point",
"-bordercolor color border color",
"-caption string assign a caption to an image",
- "-channel type apply option to select image channels",
"-clip clip along the first path from the 8BIM profile",
"-clip-mask filename associate a clip mask with the image",
"-clip-path id clip along a named path from the 8BIM profile",
},
*operators[]=
{
+ "-channel mask set the image channel mask",
"-grayscale method convert image to grayscale",
"-negate replace every pixel with its complementary color ",
(char *) NULL
"-antialias remove pixel-aliasing",
"-authenticate password",
" decipher image with this password",
- "-channel type apply option to select image channels",
"-clip clip along the first path from the 8BIM profile",
"-clip-mask filename associate a clip mask with the image",
"-clip-path id clip along a named path from the 8BIM profile",
exception);
break;
}
+ if (LocaleCompare("channel",option+1) == 0)
+ {
+ ChannelType
+ channel;
+
+ (void) SyncImageSettings(mogrify_info,*image,exception);
+ if (*option == '+')
+ {
+ SetPixelChannelMask(*image,DefaultChannels);
+ break;
+ }
+ channel=(ChannelType) ParseChannelOption(argv[i+1]);
+ SetPixelChannelMask(*image,channel);
+ break;
+ }
if (LocaleCompare("charcoal",option+1) == 0)
{
/*
mogrify_image=ChopImage(*image,&geometry,exception);
break;
}
- if (LocaleCompare("perceptible",option+1) == 0)
- {
- /*
- Perceptible image.
- */
- (void) SyncImageSettings(mogrify_info,*image,exception);
- (void) PerceptibleImage(*image,StringToDouble(argv[i+1],
- (char **) NULL),exception);
- break;
- }
if (LocaleCompare("clip",option+1) == 0)
{
(void) SyncImageSettings(mogrify_info,*image,exception);
geometry_info.sigma,exception);
break;
}
+ if (LocaleCompare("perceptible",option+1) == 0)
+ {
+ /*
+ Perceptible image.
+ */
+ (void) SyncImageSettings(mogrify_info,*image,exception);
+ (void) PerceptibleImage(*image,StringToDouble(argv[i+1],
+ (char **) NULL),exception);
+ break;
+ }
if (LocaleCompare("pointsize",option+1) == 0)
{
if (*option == '+')
" improve brightness / contrast of the image",
"-canny geometry detect edges in the image",
"-cdl filename color correct with a color decision list",
+ "-channel mask set the image channel mask",
"-charcoal geometry simulate a charcoal drawing",
"-chop geometry remove pixels from the image interior",
"-clamp keep pixel values in range (0-QuantumRange)",
"-blue-primary point chromaticity blue primary point",
"-bordercolor color border color",
"-caption string assign a caption to an image",
- "-channel type apply option to select image channels",
"-colors value preferred number of colors in the image",
"-colorspace type alternate image colorspace",
"-comment string annotate image with comment",
(void) SetImageOption(image_info,option+1,argv[i+1]);
break;
}
- if (LocaleCompare("channel",option+1) == 0)
- {
- 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)
{
if (*option == '+')
"-auto-orient automagically orient image",
"-blur geometry reduce image noise and reduce detail levels",
"-border geometry surround image with a border of color",
+ "-channel mask set the image channel mask",
"-crop geometry preferred size and location of the cropped image",
"-extent geometry set the image size",
"-flatten flatten a sequence of images",
"-blue-primary point chromaticity blue primary point",
"-bordercolor color border color",
"-caption string assign a caption to an image",
- "-channel type apply option to select image channels",
"-colors value preferred number of colors in the image",
"-colorspace type alternate image colorsapce",
"-comment string annotate image with comment",
(void) SetImageOption(_image_info,option+1,ArgOption(NULL));
break;
}
- if (LocaleCompare("channel",option+1) == 0)
- {
- parse=ParseChannelOption(ArgOption("Default"));
- if (parse < 0)
- CLIWandExceptArgBreak(OptionError,"UnrecognizedChannelType",
- option,arg1);
- _image_info->channel=(ChannelType) parse;
- (void) SetImageOption(_image_info,option+1,arg1);
- break;
- }
if (LocaleCompare("colorspace",option+1) == 0)
{
/* Setting used for new images via AquireImage()
But also used as a SimpleImageOperator
Undefined colorspace means don't modify images on
read or as a operation */
- parse = ParseCommandOption(MagickColorspaceOptions,MagickFalse,
- ArgOption("undefined"));
+ parse=ParseCommandOption(MagickColorspaceOptions,MagickFalse,
+ ArgOption("undefined"));
if (parse < 0)
- CLIWandExceptArgBreak(OptionError,"UnrecognizedColorspace",
- option,arg1);
+ CLIWandExceptArgBreak(OptionError,"UnrecognizedColorspace",option,
+ arg1);
_image_info->colorspace=(ColorspaceType) parse;
break;
}
_exception);
break;
}
+ if (LocaleCompare("channel",option+1) == 0)
+ {
+ if (IfPlusOp)
+ {
+ SetPixelChannelMask(_image,DefaultChannels);
+ break;
+ }
+ parse=ParseChannelOption(arg1);
+ if (parse < 0)
+ CLIWandExceptArgBreak(OptionError,"UnrecognizedIntensityMethod",
+ option,arg1);
+ SetPixelChannelMask(_image,(ChannelType) parse);
+ break;
+ }
if (LocaleCompare("charcoal",option+1) == 0)
{
flags=ParseGeometry(arg1,&geometry_info);
static const char
*miscellaneous[]=
{
+ "-channel mask set the image channel mask",
"-debug events display copious debugging information",
"-help print program options",
"-list type print a list of supported option arguments",
{
"-authenticate password",
" decipher image with this password",
- "-channel type apply option to select image channels",
"-colorspace type alternate image colorspace",
"-compress type type of pixel compression when writing the image",
"-define format:option",
transparent, extract, background, or shape
\-authenticate value decrypt image with this password
\-backdrop display image centered on a backdrop
- \-channel type apply option to select image channels
\-colormap type Shared or Private
\-colorspace type alternate image colorspace
\-decipher filename convert cipher pixels to plain pixels
\-window id display image to background of this window
Image Operators:
+ \-channel mask set the image channel mask
\-colors value preferred number of colors in the image
\-crop geometry preferred size and location of the cropped image
\-extract geometry extract area from image
transparent, extract, background, or shape
\-authenticate value decrypt image with this password
\-backdrop display image centered on a backdrop
- \-channel type apply option to select image channels
\-colormap type Shared or Private
\-colorspace type alternate image colorspace
\-decipher filename convert cipher pixels to plain pixels
\-window id display image to background of this window
Image Operators:
+ \-channel mask set the image channel mask
\-colors value preferred number of colors in the image
\-crop geometry preferred size and location of the cropped image
\-extract geometry extract area from image
\-alpha option on, activate, off, deactivate, set, opaque, copy
\ transparent, extract, background, or shape
\-authenticate value decrypt image with this password
- \-channel type apply option to select image channels
\-colorspace type alternate image colorspace
\-compose operator set image composite operator
\-compress type type of pixel compression when writing the image
virtual pixel access method
Miscellaneous Options:
+ \-channel mask set the image channel mask
\-debug events display copious debugging information
\-help print program options
\-log format format of debugging information
\-alpha option on, activate, off, deactivate, set, opaque, copy
\ transparent, extract, background, or shape
\-authenticate value decrypt image with this password
- \-channel type apply option to select image channels
\-colorspace type alternate image colorspace
\-compose operator set image composite operator
\-compress type type of pixel compression when writing the image
virtual pixel access method
Miscellaneous Options:
+ \-channel mask set the image channel mask
\-debug events display copious debugging information
\-help print program options
\-log format format of debugging information
\ transparent, extract, background, or shape
\-authenticate value decrypt image with this password
\-blue-primary point chromaticity blue primary point
- \-channel type apply option to select image channels
\-colorspace type alternate image colorspace
\-comment string annotate image with comment
\-compose operator composite operator
\-blend geometry blend images
\-border geometry surround image with a border of color
\-bordercolor color border color
+ \-channel mask set the image channel mask
\-colors value preferred number of colors in the image
\-displace geometry shift image pixels defined by a displacement map
\-dissolve value dissolve the two images a given percent
\-bordercolor color border color
\-caption string assign a caption to an image
\-cdl filename color correct with a color decision list
- \-channel type apply option to select image channels
\-clip clip along the first path from the 8BIM profile
\-clip-mask filename associate a clip mask with the image
\-clip-path id clip along a named path from the 8BIM profile
\-brightness-contrast geometry
\ improve brightness / contrast of the image
\-canny geometry detect edges in the image
+ \-channel mask set the image channel mask
\-charcoal radius simulate a charcoal drawing
\-chop geometry remove pixels from the image interior
\-clamp keep pixel values in range (0-QuantumRange)
\-antialias remove pixel-aliasing
\-authenticate value decrypt image with this password
\-backdrop display image centered on a backdrop
- \-channel type apply option to select image channels
\-colormap type Shared or Private
\-colorspace type alternate image colorspace
\-comment string annotate image with comment
Image Operators:
\-auto-orient automatically orient image
\-border geometry surround image with a border of color
+ \-channel mask set the image channel mask
\-clip clip along the first path from the 8BIM profile
\-clip-path id clip along a named path from the 8BIM profile
\-colors value preferred number of colors in the image
transparent, extract, background, or shape
\-antialias remove pixel-aliasing
\-authenticate value decrypt image with this password
- \-channel type apply option to select image channels
\-clip clip along the first path from the 8BIM profile
\-clip-mask filename associate a clip mask with the image
\-clip-path id clip along a named path from the 8BIM profile
virtual pixel access method
Image Operators:
+ \-channel mask set the image channel mask
\-grayscale method convert image to grayscale
\-negate replace each pixel with its complementary color
Image Settings:
\-adjoin join images into a single multi-image file
\-border include window border in the output image
- \-channel type apply option to select image channels
\-colorspace type alternate image colorspace
\-comment string annotate image with comment
\-compress type type of pixel compression when writing the image
Image Operators:
\-annotate geometry text
annotate the image with text
+ \-channel mask set the image channel mask
\-colors value preferred number of colors in the image
\-crop geometry preferred size and location of the cropped image
\-geometry geometry preferred size or location of the image
\-bordercolor color border color
\-caption string assign a caption to an image
\-cdl filename color correct with a color decision list
- \-channel type apply option to select image channels
\-colors value preferred number of colors in the image
\-colorspace type alternate image colorspace
\-comment string annotate image with comment
force all pixels below the threshold into black
\-blur geometry reduce image noise and reduce detail levels
\-border geometry surround image with a border of color
+ \-channel mask set the image channel mask
\-charcoal radius simulate a charcoal drawing
\-chop geometry remove pixels from the image interior
\-clip clip along the first path from the 8BIM profile
\-bordercolor color border color
\-caption string assign a caption to an image
\-cdl filename color correct with a color decision list
- \-channel type apply option to select image channels
\-colors value preferred number of colors in the image
\-colorspace type alternate image colorspace
\-comment string annotate image with comment
force all pixels below the threshold into black
\-blur geometry reduce image noise and reduce detail levels
\-border geometry surround image with a border of color
+ \-channel mask set the image channel mask
\-charcoal radius simulate a charcoal drawing
\-chop geometry remove pixels from the image interior
\-clip clip along the first path from the 8BIM profile
\-bordercolor color border color
\-caption string assign a caption to an image
\-cdl filename color correct with a color decision list
- \-channel type apply option to select image channels
\-colors value preferred number of colors in the image
\-colorspace type alternate image colorspace
\-comment string annotate image with comment
\-brightness-contrast geometry
improve brightness / contrast of the image
\-canny geometry detect edges in the image
+ \-channel mask set the image channel mask
\-charcoal radius simulate a charcoal drawing
\-chop geometry remove pixels from the image interior
\-clamp keep pixel values in range (0-QuantumRange)
\-blue-primary point chromaticity blue primary point
\-bordercolor color border color
\-caption string assign a caption to an image
- \-channel type apply option to select image channels
\-colors value preferred number of colors in the image
\-colorspace type alternate image colorsapce
\-comment string annotate image with comment
\-auto-orient automagically orient image
\-blur geometry reduce image noise and reduce detail levels
\-border geometry surround image with a border of color
+ \-channel mask set the image channel mask
\-crop geometry preferred size and location of the cropped image
\-extent geometry set the image size
\-flatten flatten a sequence of images
.SH DESCRIPTION
Image Settings:
\-authenticate value decrypt image with this password
- \-channel type apply option to select image channels
\-colorspace type alternate image colorspace
\-compress type type of pixel compression when writing the image
\-define format:option
virtual pixel access method
Miscellaneous Options:
+ \-channel mask set the image channel mask
\-debug events display copious debugging information
\-help print program options
\-log format format of debugging information