CommandOptions[] =
{
/* WARNING: this must be sorted by name, then by switch character
- So that it can be referanced using a binary search for speed.
- See GetCommandOptionInfo() below for details.
+ So that it can be referenced using a binary search for speed.
+ See GetCommandOptionInfo() below for details.
Check on sort...
magick -list command > t1
{ "-cdl", 1L, SimpleOperatorOptionFlag, MagickFalse },
{ "+channel", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
{ "-channel", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
+ { "-channel-extract", 1L, SimpleOperatorOptionFlag, MagickFalse },
+ { "-channel-inject", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickTrue },
+ { "-channel-swap", 1L, SimpleOperatorOptionFlag, MagickFalse },
{ "+charcoal", 0L, DeprecateOptionFlag, MagickTrue },
{ "-charcoal", 0L, SimpleOperatorOptionFlag, MagickFalse },
{ "+chop", 1L, DeprecateOptionFlag, MagickTrue },
static MagickBooleanType ConvertUsage(void)
{
static const char
+ *channel_operators[]=
+ {
+ "-channel-extract channel-list",
+ " extract the channels in order",
+ "-channel-inject channel-list",
+ " inject the channels in order",
+ "-channel-swap channel,channel",
+ " swap channels",
+ (char *) NULL
+ },
*miscellaneous[]=
{
"-debug events display copious debugging information",
(void) printf("\nImage Operators:\n");
for (p=operators; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
+ (void) printf("\nImage Channel Operators:\n");
+ for (p=channel_operators; *p != (char *) NULL; p++)
+ (void) printf(" %s\n",*p);
(void) printf("\nImage Sequence Operators:\n");
for (p=sequence_operators; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
argv[i]);
break;
}
+ if (LocaleCompare("channel-extract",option+1) == 0)
+ {
+ ssize_t
+ channel;
+
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowConvertException(OptionError,"MissingArgument",option);
+ channel=ParseChannelOption(argv[i]);
+ if (channel < 0)
+ ThrowConvertException(OptionError,"UnrecognizedChannelType",
+ argv[i]);
+ break;
+ }
+ if (LocaleCompare("channel-inject",option+1) == 0)
+ {
+ ssize_t
+ channel;
+
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowConvertException(OptionError,"MissingArgument",option);
+ channel=ParseChannelOption(argv[i]);
+ if (channel < 0)
+ ThrowConvertException(OptionError,"UnrecognizedChannelType",
+ argv[i]);
+ break;
+ }
+ if (LocaleCompare("channel-swap",option+1) == 0)
+ {
+ ssize_t
+ channel;
+
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowConvertException(OptionError,"MissingArgument",option);
+ channel=ParseChannelOption(argv[i]);
+ if (channel < 0)
+ ThrowConvertException(OptionError,"UnrecognizedChannelType",
+ argv[i]);
+ break;
+ }
if (LocaleCompare("charcoal",option+1) == 0)
{
if (*option == '+')
exception);
break;
}
+ if (LocaleCompare("channel-extract",option+1) == 0)
+ {
+ puts("stand by...");
+ break;
+ }
+ if (LocaleCompare("channel-swap",option+1) == 0)
+ {
+ puts("stand by...");
+ break;
+ }
if (LocaleCompare("charcoal",option+1) == 0)
{
/*
static MagickBooleanType MogrifyUsage(void)
{
static const char
+ *channel_operators[]=
+ {
+ "-channel-extract channel-list",
+ " extract the channels in order",
+ "-channel-inject channel-list",
+ " inject the channels in order",
+ "-channel-swap channel,channel",
+ " swap channels",
+ (char *) NULL
+ },
*miscellaneous[]=
{
"-debug events display copious debugging information",
(void) printf("\nImage Operators:\n");
for (p=operators; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
+ (void) printf("\nImage Channel Operators:\n");
+ for (p=channel_operators; *p != (char *) NULL; p++)
+ (void) printf(" %s\n",*p);
(void) printf("\nImage Sequence Operators:\n");
for (p=sequence_operators; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
argv[i]);
break;
}
+ if (LocaleCompare("channel-extract",option+1) == 0)
+ {
+ ssize_t
+ channel;
+
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowMogrifyException(OptionError,"MissingArgument",option);
+ channel=ParseChannelOption(argv[i]);
+ if (channel < 0)
+ ThrowMogrifyException(OptionError,"UnrecognizedChannelType",
+ argv[i]);
+ break;
+ }
+ if (LocaleCompare("channel-inject",option+1) == 0)
+ {
+ ssize_t
+ channel;
+
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowMogrifyException(OptionError,"MissingArgument",option);
+ channel=ParseChannelOption(argv[i]);
+ if (channel < 0)
+ ThrowMogrifyException(OptionError,"UnrecognizedChannelType",
+ argv[i]);
+ break;
+ }
+ if (LocaleCompare("channel-swap",option+1) == 0)
+ {
+ ssize_t
+ channel;
+
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowMogrifyException(OptionError,"MissingArgument",option);
+ channel=ParseChannelOption(argv[i]);
+ if (channel < 0)
+ ThrowMogrifyException(OptionError,"UnrecognizedChannelType",
+ argv[i]);
+ break;
+ }
if (LocaleCompare("cdl",option+1) == 0)
{
if (*option == '+')
}
case 'c':
{
+ if (LocaleCompare("channel-inject",option+1) == 0)
+ {
+ puts("stand by...");
+ break;
+ }
if (LocaleCompare("clut",option+1) == 0)
{
Image
SetPixelChannelMapMask(image,image_info->channel);
break;
}
+ if (LocaleCompare("channel-extract",option) == 0)
+ {
+ puts("stand by...");
+ break;
+ }
+ if (LocaleCompare("channel-swap",option) == 0)
+ {
+ puts("stand by...");
+ break;
+ }
if (LocaleCompare("charcoal",option) == 0)
{
flags=ParseGeometry(arg1,&geometry_info);
}
case 'c':
{
+ if (LocaleCompare("channel-inject",option) == 0)
+ {
+ puts("stand by...");
+ break;
+ }
if (LocaleCompare("clut",option) == 0)
{
- /* FUTURE - make this a compose option (and thus layers compose )
- or perhaps compose last image over all other images.
- */
Image
*clut_image;
+ /* FUTURE - make this a compose option (and thus layers compose )
+ or perhaps compose last image over all other images.
+ */
new_images=RemoveFirstImageFromList(&images);
clut_image=RemoveLastImageFromList(&images);
/* FUTURE - produce Exception, rather than silent fail */
if (clut_image == (Image *) NULL)
- break;
+ break;
(void) ClutImage(new_images,clut_image,images->interpolate,exception);
clut_image=DestroyImage(clut_image);
break;
\-white-threshold value
force all pixels above the threshold into white
+
+Image Channel Operators:
+ \-channel-extract channel-list
+ extract the channels in order
+ \-channel-inject channel-list
+ inject the channels in order
+ \-channel-swap channel,channel
+ swap the channels
+
Image Sequence Operators:
\-affinity filename transform image colors to match this set of colors
\-append append an image sequence top to bottom (use +append for left to right)
\-white-threshold value
force all pixels above the threshold into white
+Image Channel Operators:
+ \-channel-extract channel-list
+ extract the channels in order
+ \-channel-inject channel-list
+ inject the channels in order
+ \-channel-swap channel,channel
+ swap the channels
+
Image Sequence Operators:
\-affinity filename transform image colors to match this set of colors
\-append append an image sequence top to botto (use +append for left to right)