interpolate_method,exception);
break;
}
- if (LocaleCompare("poly",option+1) == 0)
- {
- char
- *args,
- token[MaxTextExtent];
-
- const char
- *p;
-
- double
- *arguments;
-
- register ssize_t
- x;
-
- size_t
- number_arguments;
-
- /*
- Polynomial image.
- */
- (void) SyncImageSettings(mogrify_info,*image,exception);
- args=InterpretImageProperties(mogrify_info,*image,argv[i+1],
- exception);
- if (args == (char *) NULL)
- break;
- p=(char *) args;
- for (x=0; *p != '\0'; x++)
- {
- GetMagickToken(p,&p,token);
- if (*token == ',')
- GetMagickToken(p,&p,token);
- }
- number_arguments=(size_t) x;
- arguments=(double *) AcquireQuantumMemory(number_arguments,
- sizeof(*arguments));
- if (arguments == (double *) NULL)
- ThrowWandFatalException(ResourceLimitFatalError,
- "MemoryAllocationFailed",(*image)->filename);
- (void) ResetMagickMemory(arguments,0,number_arguments*
- sizeof(*arguments));
- p=(char *) args;
- for (x=0; (x < (ssize_t) number_arguments) && (*p != '\0'); x++)
- {
- GetMagickToken(p,&p,token);
- if (*token == ',')
- GetMagickToken(p,&p,token);
- arguments[x]=StringToDouble(token,(char **) NULL);
- }
- args=DestroyString(args);
- mogrify_image=PolynomialImage(*image,number_arguments >> 1,
- arguments,exception);
- arguments=(double *) RelinquishMagickMemory(arguments);
- }
if (LocaleCompare("posterize",option+1) == 0)
{
/*
}
case 'p':
{
+ if (LocaleCompare("poly",option+1) == 0)
+ {
+ char
+ *args,
+ token[MaxTextExtent];
+
+ const char
+ *p;
+
+ double
+ *arguments;
+
+ Image
+ *polynomial_image;
+
+ register ssize_t
+ x;
+
+ size_t
+ number_arguments;
+
+ /*
+ Polynomial image.
+ */
+ (void) SyncImageSettings(mogrify_info,*images,exception);
+ args=InterpretImageProperties(mogrify_info,*images,argv[i+1],
+ exception);
+ if (args == (char *) NULL)
+ break;
+ p=(char *) args;
+ for (x=0; *p != '\0'; x++)
+ {
+ GetMagickToken(p,&p,token);
+ if (*token == ',')
+ GetMagickToken(p,&p,token);
+ }
+ number_arguments=(size_t) x;
+ arguments=(double *) AcquireQuantumMemory(number_arguments,
+ sizeof(*arguments));
+ if (arguments == (double *) NULL)
+ ThrowWandFatalException(ResourceLimitFatalError,
+ "MemoryAllocationFailed",(*images)->filename);
+ (void) ResetMagickMemory(arguments,0,number_arguments*
+ sizeof(*arguments));
+ p=(char *) args;
+ for (x=0; (x < (ssize_t) number_arguments) && (*p != '\0'); x++)
+ {
+ GetMagickToken(p,&p,token);
+ if (*token == ',')
+ GetMagickToken(p,&p,token);
+ arguments[x]=StringToDouble(token,(char **) NULL);
+ }
+ args=DestroyString(args);
+ polynomial_image=PolynomialImage(*images,number_arguments >> 1,
+ arguments,exception);
+ arguments=(double *) RelinquishMagickMemory(arguments);
+ if (polynomial_image == (Image *) NULL)
+ {
+ status=MagickFalse;
+ break;
+ }
+ *images=DestroyImageList(*images);
+ *images=polynomial_image;
+ }
if (LocaleCompare("print",option+1) == 0)
{
char
_image->interpolate,_exception);
break;
}
- if (LocaleCompare("poly",option+1) == 0)
- {
- double
- *args;
-
- ssize_t
- count;
-
- /* convert argument string into an array of doubles */
- args = StringToArrayOfDoubles(arg2,&count,_exception);
- if (args == (double *)NULL )
- CLIWandExceptArgBreak(OptionError,"InvalidNumberList",option,arg2);
- new_image=PolynomialImage(_image,count >> 1,args,_exception);
- args=(double *) RelinquishMagickMemory(args);
- break;
- }
if (LocaleCompare("posterize",option+1) == 0)
{
flags=ParseGeometry(arg1,&geometry_info);
}
case 'p':
{
+ if (LocaleCompare("poly",option+1) == 0)
+ {
+ double
+ *args;
+
+ ssize_t
+ count;
+
+ /* convert argument string into an array of doubles */
+ args = StringToArrayOfDoubles(arg2,&count,_exception);
+ if (args == (double *)NULL )
+ CLIWandExceptArgBreak(OptionError,"InvalidNumberList",option,arg2);
+ new_images=PolynomialImage(_images,count >> 1,args,_exception);
+ args=(double *) RelinquishMagickMemory(args);
+ break;
+ }
if (LocaleCompare("print",option+1) == 0)
{
(void) FormatLocaleFile(stdout,"%s",arg1);