FFT run-time linking: which DLL?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
martinvicanek

FFT run-time linking: which DLL?

Post by martinvicanek »

Hi,

Warning: I am a newbie, so my question might be very basic to most of you. Anyway:

I want to use IM's FFT feature (and once I succeed, also the inverse FFT ;-). From the command line this would be achieved with the convert -fft ... command, however, I would like to access it from within some code of mine on a Windows platform using run-time linking of the appropriate DLL(s). In a C-code, this would be done in three steps:

1. LoadLibrary -> I need to know the name of the DLL which contains the FFT function
2. GetProcAddress -> I need to know the FFT function's name within that DLL
3. use the FFT function -> I need to know the syntax of the FFT function call

The documentation seems to assume linking at compile time however I want to use the compiled DLLs rather than binding the IM sources. I have not been able to find the information needed to do this (see 1, 2, 3 above). Any help (idealy an example code sniplet) would be most appreciated!

Many thanks
Martin
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: FFT run-time linking: which DLL?

Post by fmw42 »

You need to install the FFTW delegate library and then recompile IM. For more details see viewtopic.php?f=4&t=14251#p56836

Note that there has been a bug in FFT (when used with HDRI, e.g. +fft, +ift for real/imaginary components) for the last few releases that is being worked on right now and should be fixed in IM 6.6.2.3 in the next few days.

see viewtopic.php?f=3&t=16365


Sorry I am a Mac user and cannot advise further about use on Windows.
martinvicanek

Re: FFT run-time linking: which DLL?

Post by martinvicanek »

Thanks, fmw42, for pointing me to the FTTW package. It looks like I might be able to use their DLLs directly.

Regards
Martin
Post Reply