ChannelOptions[] =
{
{ "Undefined", UndefinedChannel, UndefinedOptionFlag, MagickTrue },
+ /* special */
{ "All", CompositeChannels, UndefinedOptionFlag, MagickFalse },
+ { "Sync", SyncChannels, UndefinedOptionFlag, MagickFalse },
+ { "Default", DefaultChannels, UndefinedOptionFlag, MagickFalse },
+ /* individual channel */
+ { "A", AlphaChannel, UndefinedOptionFlag, MagickFalse },
{ "Alpha", AlphaChannel, UndefinedOptionFlag, MagickFalse },
{ "Black", BlackChannel, UndefinedOptionFlag, MagickFalse },
+ { "B", BlueChannel, UndefinedOptionFlag, MagickFalse },
{ "Blue", BlueChannel, UndefinedOptionFlag, MagickFalse },
+ { "C", CyanChannel, UndefinedOptionFlag, MagickFalse },
{ "Cyan", CyanChannel, UndefinedOptionFlag, MagickFalse },
- { "Default", DefaultChannels, UndefinedOptionFlag, MagickFalse },
{ "Gray", GrayChannel, UndefinedOptionFlag, MagickFalse },
+ { "G", GreenChannel, UndefinedOptionFlag, MagickFalse },
{ "Green", GreenChannel, UndefinedOptionFlag, MagickFalse },
+ { "H", RedChannel, UndefinedOptionFlag, MagickFalse },
{ "Hue", RedChannel, UndefinedOptionFlag, MagickFalse },
+ { "K", BlackChannel, UndefinedOptionFlag, MagickFalse },
+ { "L", BlueChannel, UndefinedOptionFlag, MagickFalse },
{ "Lightness", BlueChannel, UndefinedOptionFlag, MagickFalse },
{ "Luminance", BlueChannel, UndefinedOptionFlag, MagickFalse },
{ "Luminosity", BlueChannel, DeprecateOptionFlag, MagickTrue },
+ { "M", MagentaChannel, UndefinedOptionFlag, MagickFalse },
{ "Magenta", MagentaChannel, UndefinedOptionFlag, MagickFalse },
- { "Matte", AlphaChannel, UndefinedOptionFlag, MagickFalse },
- { "Opacity", AlphaChannel, UndefinedOptionFlag, MagickFalse },
+ { "Matte", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
+ { "Opacity", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
+ { "R", RedChannel, UndefinedOptionFlag, MagickFalse },
{ "Red", RedChannel, UndefinedOptionFlag, MagickFalse },
+ { "S", GreenChannel, UndefinedOptionFlag, MagickFalse },
{ "Saturation", GreenChannel, UndefinedOptionFlag, MagickFalse },
+ { "Y", YellowChannel, UndefinedOptionFlag, MagickFalse },
{ "Yellow", YellowChannel, UndefinedOptionFlag, MagickFalse },
- { "Sync", SyncChannels, UndefinedOptionFlag, MagickFalse },
{ (char *) NULL, UndefinedChannel, UndefinedOptionFlag, MagickFalse }
},
ClassOptions[] =
{ "A", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
{ "Alpha", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
{ "B", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
+ { "Bk", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
{ "Black", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
{ "Blue", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
{ "Cb", CbPixelChannel, UndefinedOptionFlag, MagickFalse },
case 'o':
case 'O':
{
- channel|=AlphaChannel;
+ channel|=AlphaChannel; /* depreciate */
break;
}
case 'R':
WandExport void CLISettingOptionInfo(MagickCLI *cli_wand,
const char *option,const char *arg1)
{
+ ssize_t
+ parse; /* option argument parsing (string to value table lookup) */
+
assert(cli_wand != (MagickCLI *) NULL);
assert(cli_wand->signature == WandSignature);
assert(cli_wand->wand.signature == WandSignature);
SyncImageSettings() used to set per-image attribute.
FUTURE: if _image_info->background_color is not set then
- we should fall back to image
- Note that +background, means fall-back to image background
- and only if not set fall back to BackgroundColor const.
+ we should fall back to per-image background_color
+
+ At this time -background will 'wipe out' the per-image
+ background color!
+
+ Better error handling of QueryColorCompliance() needed.
*/
(void) SetImageOption(_image_info,option+1,ArgOption(NULL));
(void) QueryColorCompliance(ArgOption(BackgroundColor),AllCompliance,
{
/* FUTURE: both _image_info attribute & ImageOption in use!
SyncImageSettings() used to set per-image attribute.
+ Better error checking of QueryColorCompliance().
*/
if (IfSetOption)
{
}
if (LocaleCompare("channel",option+1) == 0)
{
- /* FUTURE: -channel mask {vaules}
- This is also applied to images in SimpleImageOperator!!!
- Move it to SyncImageSettings() - or alternative
- */
- ssize_t
- channel = DefaultChannels;
- if ( IfSetOption ) {
- channel=ParseChannelOption(arg1);
- if (channel < 0)
- CLIWandExceptArgBreak(OptionError,"UnrecognizedChannelType",
- option,arg1);
- (void) SetImageOption(_image_info,option+1,arg1);
- } else {
- (void) SetImageOption(_image_info,option+1,"default");
- }
- _image_info->channel=(ChannelType) channel;
+ arg1=ArgOption("default");
+ parse=ParseChannelOption(arg1);
+ 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)
But also used as a SimpleImageOperator
Undefined colorspace means don't modify images on
read or as a operation */
- ssize_t
- colorspace = ParseCommandOption(MagickColorspaceOptions,
- MagickFalse,ArgOption("undefined"));
- if (colorspace < 0)
+ parse = ParseCommandOption(MagickColorspaceOptions,MagickFalse,
+ ArgOption("undefined"));
+ if (parse < 0)
CLIWandExceptArgBreak(OptionError,"UnrecognizedColorspace",
option,arg1);
- _image_info->colorspace=(ColorspaceType) colorspace;
+ _image_info->colorspace=(ColorspaceType) parse;
break;
}
if (LocaleCompare("comment",option+1) == 0)