Compiling ImageMagick
In order to compile Immaavs you don't need to compile ImageMagick itself.
However if you want to update the ImageMagick libraries you will need to compile
ImageMagick. How it is compiled with VC6/VC7 is described here.
- Download ImageMagick: ftp://ftp.imagemagick.org/pub/ImageMagick/windows.
- Build configure.exe using configure.dsw which can be found in
ImageMagick-6.5.8\VisualMagick\configure.
- Include postscript and or raw camera format support:
- EPS/PDF/PS support:
- For EPS/PDF/PS support, you need to install GhostScript. I have installed version 8.64:
gs864w32.exe.
-
In the delegate file, ImageMagick-6.5.8\VisualMagick\bin\delegates.xlm, replace all occurances of @PSDelegate by gswin32c.exe (that file comes with Ghostscript and is located
in gs\gs8.64\bin).
- In system variables (Control Panel, System, Advanced, Environment
Variables), add the location of gswin32c.exe to the PATH.
- Raw camera format support:
-
For raw camera support format you need to have a valid patched version of dcraw.exe in the bin-folder of ImageMagick. You can get it
here.
[See "patching and compiling Dcraw"
if you want to compile and patch a different version.]
-
In system variables (Control Panel, System, Advanced, Environment
Variables), add the location of dcraw.exe to the PATH.
- Create the workspace file 'VisualDynamicMT.dsw':
Run configure.exe and select 'Dynamic Multi-threaded runtimes' and uncheck 'Generate Visual Studio 7 format' (if you are using VC6).
Leave the "X11 stubs ... box" checked.
Click on 'edit "magick_config.h"' and change
#define MAGICKCORE_QUANTUM_DEPTH 16
to
#define MAGICKCORE_QUANTUM_DEPTH 8
and save it.
Build the libraries (rebuild all - release version) using VisualDynamicMT.dsw under
ImageMagick-6.5.8\VisualMagick.
- Compiling 6.5.8-5: If you get error messages about undeclared identifiers, you need to add them
in this file:
F:\CompilingPlugins\ImageMagick-6.5.8\Magick++\lib\Magick++\include.h
I
needed to add the following two lines:
#if
defined(MAGICKCORE_IMPLEMENTATION)
...
using
MagickCore::FastFourierTransformImage;
using
MagickCore::InverseFourierTransformImage;
Compiling with VC8:
ImageMagick is not compilable with the free edition of VC8 (Enterprise), because it comes without the MFC stuff. Get the professional edition.
Patching and compiling Dcraw
You need to patch Dcraw because later versions have removed the ouput -O
option. That option restores that functionality which is needed for the delegate
file.
- Get dcraw.c from http://www.cybercom.net/~dcoffin/dcraw/
and put it in an empty folder.
- Get the jpeg-library (jpeg.lib) and header file (jpeglib.h) from http://www.ece.sunysb.edu/~cvl/e358/f2001/jpeg-windows.html and put
them in a subfolder of dcraw.
- Apply the following patch: dcraw_path.txt.
- Add the library module jpeg.lib in MSVC under the link tab.
- Add F:\CompilingPlugins\Dcraw\jpeg (or whatever the appropriate path is) to 'Directory -> Include files' (under Tools -> Options).
Add F:\CompilingPlugins\Dcraw\jpeg (or whatever the appropriate path is) to lib directories (Tools -> Options).
- Compile Dcraw and check whether it works. The following should produce the output file raw.ppm. Replace raw.nef by your raw camera file:
dcraw.exe -6 -w -O "raw.ppm" "raw.nef"
ImageMagick libraries
The included ImageMagick libraries are Copyright © ImageMagick Studio LLC.
Its license terms can be found here. The
libraries are compiled with MS VC++ 6.0SP5.