Page 1 of 1
Bug in analyze.dll
Posted: 2007-08-25T09:25:26-07:00
by eldiener
The analyze.dll, which is a filter, exports its function with the name 'AnalyzeImage'. However the module system looks on analyze.dll for a function named 'analyzeImage' ( note the case ). This causes a mismatch and the function is never found. The exported name for analyze.dll needs to be changed to 'analyzeImage'. I am using the latest release of ImageMagick with Magick++, release 6.3.5.
Re: Bug in analyze.dll
Posted: 2007-08-25T10:37:23-07:00
by magick
Where is AnalyzeImage being exported as analyzeImage? We checked the source distribution and cannot find any references to the lowercase analyzeImage. AnalyzeImage() works properly under Linux. We'll take a closer look to the method under Windows after we hear back from you.
Re: Bug in analyze.dll
Posted: 2007-08-25T17:39:24-07:00
by eldiener
magick wrote:Where is AnalyzeImage being exported as analyzeImage? We checked the source distribution and cannot find any references to the lowercase analyzeImage. AnalyzeImage() works properly under Linux. We'll take a closer look to the method under Windows after we hear back from you.
As I explained in my OP, the export is 'AnalyzeImage', not 'analyzeImage', but it should be the latter. The reason for this is that the DLL, or module, for the filter is 'analyze' and not 'Analyze' under Windows. When you call the ExecuteModuleProcess in module.c, passing 'analyze' as the module tag, the routine does a TagToFilterModuleName to get the name of the DLL to load as analyze.dll, correctly does a lt_dlopen on the DLL which no doubt does a Windows LoadLibrary under the covers, then concatenates the 'analyze' name with 'Image', as 'analyzeImage' to get the procedure to call via lt_dlsym. But this fails since the procedure is exported as 'AnalyzeImage' instead.
You might argue that 'Analyze' should be the tag passed to ExecuteModuleProcess but I think this is wrong because the tag reflects the shared library base name. In other words if the shared library base name is 'analyze', then the function to call using ExecuteModuleProcess should be 'analyzeImage', NOT 'AnalyzeImage'.
Why the wrong exported name works under Linux I do not know but it does not work under Windows when calling lt_dlsym in ExecuteModuleProcess in module.c.
Re: Bug in analyze.dll
Posted: 2007-08-25T17:55:24-07:00
by magick
Thanks for the detailed explanation. We will have a patch in ImageMagick 6.3.5-7 for the problem within a few days.