Compliments of user el_supremo!
For Windows Users:
These instructions describe how to recompile IM with the HDRI and FFTW options using an MSVC compiler.
Download and unzip the latest ImageMagick source distribution from http://www.imagemagick.org/script/insta ... hp#windows
Download the current FFTW binary from http://www.fftw.org/install/windows.html
and unzip it to a directory such as c:\fftw-3.2.2 and then read the file README-WINDOWS. In order to use the DLL with IM you must run the lib command as described in that file. You only need to do it for whichever floating point format your system uses - the default is 32-bit double. The others are float (f) or long double (l). For the default, just execute this command in the directory:
This file is essential to the build process as it is required by the linker when IM is built.
Start up the Control Panel program, select System|Advanced|Environment Variables and add c:\fftw-3.2.2 to the System's PATH environment variable so that the system can find the DLL whenever an IM command is executed.
Start up MSVC and select the configure solution in visualmagick\configure. Select Build|Configuration Manager and change the build configuration to Release. Now build the program.
Run the configure program. In the dialog, click Next. In the next dialog window, select "Edit magick-config.in". This will start up notepad and allows you to edit the file. Check that MAGICKCORE_QUANTUM_DEPTH is the required value (16 is best when using FFTW and/or HDRI) then check that MAGICKCORE_HDRI_SUPPORT is defined. Finally, after HDRI, add this:
Save the file and then click through the rest of the configure dialog. The program will then write your selected configuration and create a solution file which you then use to build IM.
To build IM, run MSVC again and open the solution file that configure writes in the VisualMagick directory (e.g. VisualDynamicMT.sln).
If you want a Release version of IM, change the build configuration to Release in the same way as described above for the configure program.
Before compiling, the properties of the Core_Magick project must to be modified. Find that project in the list, right click on it and select Properties:
- in C/C++|General|additional includes add the path to the fftw directory: c:\fftw-3.2.2
- in linker|General|additional libraries directory add the path to the fftw directory: c:\fftw-3.2.2
- in linker|Input|additional dependencies add libfftw3-3.lib
(Note that when you make changes to these properties you must select "Apply" or the change won't take effect)
It's best to clean the solution before doing a build but now you can do the build. Once it has finished, the DLL and EXE files will be in VisualMagick\bin