I have noticed that the InvokeDynamicImageFilter() return value seems always to be MagickFalse, even if the Filter plug-in has actually reported success. After reading the InvokeDynamicImageFilter() implementation in module.c file, I have the impression that, this happens due to incomplete handling of the value (signature) returned from the filter-plugin. The snippet bellow demonstrates in code what I have already said in words. (See the //*** comment)
This is not a big problem for me, just a little confusing, but I am reporting it, since it seems an easy fix to do...
Best Regards
Jim Xochellis
Code: Select all
//---------------------------------
status = MagickFalse;
/* ... code that does not affect the <status> value ... */
/*
Execute the module.
*/
image_filter=(ImageFilterHandler *) lt_dlsym(handle,name);
if (image_filter == (ImageFilterHandler *) NULL)
(void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
"UnableToLoadModule","`%s': %s",name,lt_dlerror());
else
{
unsigned long
signature;
if ((*images)->debug != MagickFalse)
(void) LogMagickEvent(ModuleEvent,GetMagickModule(),
"Invoking \"%s\" dynamic image filter",tag);
signature=image_filter(images,argc,argv,exception);
if ((*images)->debug != MagickFalse)
(void) LogMagickEvent(ModuleEvent,GetMagickModule(),"\"%s\" completes",
tag);
if (signature != MagickImageFilterSignature)
{
(void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
"ImageFilterSignatureMismatch","`%s': %8lx != %8lx",tag,signature,
MagickImageFilterSignature);
return(MagickFalse);
}
//*** ELSE IS MISSING HERE (success case)
}
/*
Close the module.
*/
(void) lt_dlclose(handle);
return(status);
//---------------------------------