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.

  1. Download ImageMagick: ftp://ftp.imagemagick.org/pub/ImageMagick/windows.
  2. Build configure.exe using configure.dsw which can be found in ImageMagick-6.5.8\VisualMagick\configure.
  3. Include postscript and or raw camera format support:
  4. 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.
  5. 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

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.

  1. Get dcraw.c from http://www.cybercom.net/~dcoffin/dcraw/ and put it in an empty folder.
  2. 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.
  3. Apply the following patch: dcraw_path.txt.
  4. Add the library module jpeg.lib in MSVC under the link tab.
  5. 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).
  6. 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 (and dll's) are compiled with ImageMagick 6.5.8.