# define IsMagickNot(v) (IfMagickTrue(v)?MagickFalse:MagickTrue)
#endif
#define IfStringTrue(v) IfMagickTrue(IsStringTrue(v))
-#define IfStringNotFalse(v) IfMagickTrue(IsStringNotFalse(v))
#define IsMagickNULL(v) (((void *)(v) == NULL)?MagickTrue:MagickFalse)
#define IsMagickNotNULL(v) (((void *)(v) != NULL)?MagickTrue:MagickFalse)
% %
% %
% %
-% I s S t r i n g N o t F a l s e %
+% I s S t r i n g F a l s e %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% IsStringNotFalse() returns MagickTrue, unless the string specifically
-% has a value that makes this false. that is if it has a value of
-% "false", "off", "no" or "0".
+% IsStringFalse() returns MagickTrue if the value is "false", "off", "no" or
+% "0". Any other string or undefined returns MagickFalse.
%
% Typically this is used to look at strings (options or artifacts) which
% has a default value of "true", when it has not been defined.
%
-% The format of the IsStringNotFalse method is:
+% The format of the IsStringFalse method is:
%
-% MagickBooleanType IsStringNotFalse(const char *value)
+% MagickBooleanType IsStringFalse(const char *value)
%
% A description of each parameter follows:
%
% o value: Specifies a pointer to a character array.
%
*/
-MagickExport MagickBooleanType IsStringNotFalse(const char *value)
+MagickExport MagickBooleanType IsStringFalse(const char *value)
{
if (value == (const char *) NULL)
- return(MagickTrue);
- if (LocaleCompare(value,"false") == 0)
return(MagickFalse);
+ if (LocaleCompare(value,"false") == 0)
+ return(MagickTrue);
if (LocaleCompare(value,"off") == 0)
- return(MagickFalse);
+ return(MagickTrue);
if (LocaleCompare(value,"no") == 0)
- return(MagickFalse);
+ return(MagickTrue);
if (LocaleCompare(value,"0") == 0)
- return(MagickFalse);
- return(MagickTrue);
+ return(MagickTrue);
+ return(MagickFalse);
}
\f
/*
extern MagickExport MagickBooleanType
ConcatenateString(char **,const char *),
IsStringTrue(const char *),
- IsStringNotFalse(const char *),
+ IsStringFalse(const char *),
SubstituteString(char **,const char *,const char *);
extern MagickExport size_t
else
clip_to_self=IsStringTrue(GetImageOption(mogrify_info,
"compose:clip-to-self")); /* if this is true */
- if (IsMagickFalse(clip_to_self)) /* or */
- clip_to_self=IfMagickFalse(IsStringNotFalse(GetImageOption(
- mogrify_info,"compose:outside-overlay"))) ? MagickTrue :
- MagickFalse; /* this false */
+ if (clip_to_self == MagickFalse) /* or */
+ clip_to_self=IsStringFalse(GetImageOption(mogrify_info,
+ "compose:outside-overlay"));
image=RemoveFirstImageFromList(images);
composite_image=RemoveFirstImageFromList(images);
if (composite_image == (Image *) NULL)
value=GetImageOption(_image_info,"compose:outside-overlay");
if (value != (const char *) NULL) { /* or this false */
/* FUTURE: depreciate warning for "compose:outside-overlay"*/
- clip_to_self= IsMagickFalse(IsStringNotFalse(value));
+ clip_to_self=IsStringFalse(value);
}
new_images=RemoveFirstImageFromList(&_images);
TIFFGetProfiles(tiff,image,image_info->ping,exception);
TIFFGetProperties(tiff,image,exception);
option=GetImageOption(image_info,"tiff:exif-properties");
- if (IfMagickTrue(IsStringNotFalse(option))) /* enabled by default */
+ if (IsStringFalse(option) == MagickFalse) /* enabled by default */
TIFFGetEXIFProperties(tiff,image,exception);
(void) TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLESPERPIXEL,
&samples_per_pixel);