Compiling with the ImageMagick Binaries - Contributed by Patrick - thank you very much.
The MagickNet class library is designed to be statically linked to the ImageMagick Core libraries. I am sure that it could be set up to dynamically link to ImageMagick DLL's, but that configuration did not suit my purposes, so I have not done so (sorry).
There are a couple of rules that are required for a library being linked into a .NET runtime, and so these have to be adhered to. The first thing is that the C runtimes to be used must be the Multi-threaded DLL's. Therefore, when running the ImageMagick configuration program for the VisualMagick project, ensure that this option is selected.
The other thing to sdelect is to create Visual Studio 7 project files. Although this library is designed to be built under VS2005, the Studio 7 projects are reasonably close, and after upgrade, will work ok.

There is only a minor change required to the Image Magick Header files to allow everything to compile successfully. This change is due to the fact that we are compiling the ImageMagick library statically, but the .NET assembly is being compiled to a DLL. This confuses the compile when it goes to compile inline code, as it expects to find the external functions in the library (it thinks DLL's), and cannot.
Consequently, we tell the header files what we are doing, by defining the macro MAGICK_STATIC_LINK (it is defined in the MagickInclude.h file), and setting the parameters appropriately in the ImageMagick header files.
The change is required in MagickCore.h, line 58 as follows:
#if defined(__WINDOWS__)
#if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) &&
!defined(_LIB) && !defined(MAGICK_STATIC_LINK)
You will get quite a number of warnings when you compile the ImageMagick libraries under VC2005, but these are all simply because Microsoft are deprecating the standard C library functions over their own "safer" versions. Not a great deal to worry about.
I have not included the actual project in the downloaded solution, as I have no idea of the configuration of each machine. It is not difficult to set up, though...all that is required is to create a new C++ class library, add the source modules to the project, and then include the ImageMagick static libraries in it. Remember to set the include paths to the ImageMagick folders, also.
Using the MagickNet library from any of the .NET languages is simply a matter of including a reference to the DLL. All the classes are defined under the MagickNet namespace. The Magick class contains static functions to initialise the library, and from there, it is just a matter of creating the required objects.
The following simple C# program opens a JPEG image file, resizes it to 100 x 100, and then saves it down as a PNG.
using System;
static void Main(string[] args) { MagickNet.Magick.Init(); MagicNet.Image img = new MagicNet.Image("file.jpg"); img.Resize(System.Drawing.Size(100,100)); img.Write("newFile.png"); MagickNet.Magick.Term(); }