% September 1994 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2013 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 "MagickWand/studio.h"
#include "MagickWand/MagickWand.h"
#include "MagickWand/mogrify-private.h"
+#include "MagickCore/string-private.h"
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
"-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",
"-colorspace type alternate image colorspace",
"-crop geometry cut out a rectangular region of the image",
"-define format:option",
" define one or more image format options",
"-density geometry horizontal and vertical density of the image",
"-depth value image depth",
+ "-endian type endianness (MSB or LSB) of the image",
"-extract geometry extract area from image",
- "-features distance display image features (e.g. contrast, correlation)",
+ "-features distance analyze image features (e.g. contrast, correlation)",
"-format \"string\" output formatted image characteristics",
"-fuzz distance colors within this distance are considered equal",
"-gamma value of gamma correction",
"-interlace type type of image interlacing scheme",
"-interpolate method pixel color interpolation method",
"-limit type value pixel cache resource limit",
+ "-mask filename associate a mask with the image",
"-monitor monitor progress",
"-ping efficiently determine image attributes",
"-quiet suppress all warning messages",
(char *) NULL
};
- (void) printf("Version: %s\n",GetMagickVersion((size_t *) NULL));
- (void) printf("Copyright: %s\n",GetMagickCopyright());
- (void) printf("Features: %s\n\n",GetMagickFeatures());
+ ListMagickVersion(stdout);
(void) printf("Usage: %s [options ...] file [ [options ...] "
"file ... ]\n",GetClientName());
(void) printf("\nImage Settings:\n");
for (p=miscellaneous; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
(void) printf(
- "\nBy default, the image format of `file' is determined by its magic\n");
+ "\nBy default, the image format of 'file' is determined by its magic\n");
(void) printf(
"number. To specify a particular image format, precede the filename\n");
(void) printf(
#define ThrowIdentifyInvalidArgumentException(option,argument) \
{ \
(void) ThrowMagickException(exception,GetMagickModule(),OptionError, \
- "InvalidArgument","`%s': %s",option,argument); \
+ "InvalidArgument","'%s': %s",option,argument); \
DestroyIdentify(); \
return(MagickFalse); \
}
if ((LocaleCompare("version",option+1) == 0) ||
(LocaleCompare("-version",option+1) == 0))
{
- (void) FormatLocaleFile(stdout,"Version: %s\n",
- GetMagickVersion((size_t *) NULL));
- (void) FormatLocaleFile(stdout,"Copyright: %s\n",
- GetMagickCopyright());
- (void) FormatLocaleFile(stdout,"Features: %s\n\n",
- GetMagickFeatures());
+ ListMagickVersion(stdout);
return(MagickFalse);
}
}
filename=argv[i];
if ((LocaleCompare(filename,"--") == 0) && (i < (ssize_t) (argc-1)))
filename=argv[++i];
- (void) CopyMagickString(identify_info->filename,filename,MaxTextExtent);
if (identify_info->ping != MagickFalse)
- images=PingImages(identify_info,exception);
+ images=PingImages(identify_info,filename,exception);
else
- images=ReadImages(identify_info,exception);
+ images=ReadImages(identify_info,filename,exception);
identify_info=DestroyImageInfo(identify_info);
status&=(images != (Image *) NULL) &&
(exception->severity < ErrorException);
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
- type=ParseCommandOption(MagickAlphaOptions,MagickFalse,argv[i]);
+ type=ParseCommandOption(MagickAlphaChannelOptions,MagickFalse,
+ argv[i]);
if (type < 0)
- ThrowIdentifyException(OptionError,"UnrecognizedAlphaChannelType",
- argv[i]);
+ ThrowIdentifyException(OptionError,
+ "UnrecognizedAlphaChannelOption",argv[i]);
break;
}
if (LocaleCompare("antialias",option+1) == 0)
argv[i]);
break;
}
+ if (LocaleCompare("clip",option+1) == 0)
+ break;
+ if (LocaleCompare("clip-mask",option+1) == 0)
+ {
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowIdentifyException(OptionError,"MissingArgument",option);
+ break;
+ }
+ if (LocaleCompare("clip-path",option+1) == 0)
+ {
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowIdentifyException(OptionError,"MissingArgument",option);
+ break;
+ }
if (LocaleCompare("colorspace",option+1) == 0)
{
ssize_t
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
+ case 'e':
+ {
+ if (LocaleCompare("endian",option+1) == 0)
+ {
+ ssize_t
+ endian;
+
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowIdentifyException(OptionError,"MissingArgument",option);
+ endian=ParseCommandOption(MagickEndianOptions,MagickFalse,
+ argv[i]);
+ if (endian < 0)
+ ThrowIdentifyException(OptionError,"UnrecognizedEndianType",
+ argv[i]);
+ break;
+ }
+ ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
+ }
case 'f':
{
if (LocaleCompare("features",option+1) == 0)
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
- value=InterpretLocaleValue(argv[i],&p);
+ value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowIdentifyInvalidArgumentException(option,argv[i]);
}
case 'm':
{
+ if (LocaleCompare("mask",option+1) == 0)
+ {
+ if (*option == '+')
+ break;
+ i++;
+ if (i == (ssize_t) (argc-1))
+ ThrowIdentifyException(OptionError,"MissingArgument",option);
+ break;
+ }
if (LocaleCompare("matte",option+1) == 0)
break;
if (LocaleCompare("monitor",option+1) == 0)