For Windows, please build ImageMagick as a peer in $(ABI_ROOT)/../ImageMagick/ ImageMagick.lib will need to be generated for the Win32 plug-in build of ImageMagick to work. To create ImageMagick.lib you will need MC Visual C++ Version 6.0 or better (with newer versions likely to require work or MSVC++ version 7 (aka .Net)) Check out www.imagemagick.org and get source code for ImageMagick. Presently tested with Image Magick 5.5.8 beta for Windows (11/1/03) * Either patch the source nt_base.c (search for DllMain) to add && !defined(_LIB) to the #ifdef surrounding it or change the config option ProvideDllMain to no, i.e. comment out the line that has #define ProvideDllMain - Failure to do this will result in a link error as AbiMagick also defines a DllMain (alternately you may comment out the ABI_PLUGIN_DECLARE("ImageMagick") line in abimagick) * To prevent an assert on startup, apply the patch for configure located at the bottom of this document. * To allow loading of slightly invalid BMP files (ones whose header has an invalid filesize) apply the patch at the bottom. Note: this could lead to problems if the file is corrupt in other ways. Follow steps to build ImageMagick Multithreaded static libraries for DLL CRT -Build Configure -Run Configure selecting Static Multithreaded DLL library -Load VisualStaticMTDLL.dsw workspace -Set active configuration to 'All Release' or 'All Debug' -Do a 'Clean' from the build menu -build In the lib directory (ImageMagick/VisualMagick/lib/) you will need to run: for Release builds: lib /OUT:ImageMagick_RL.lib CORE_RL*.lib for Debug builds: lib /OUT:ImageMagick_DB.lib CORE_DB*.lib The following include directories need to be in the compiler's INCLUDE path (the Makefile sets these for Windows): magick/*.h magick++/lib/magic++.h magick++/lib/magic++/*.h wand/*.h Once the library (ImageMagick_??.lib) has been created, the plugin should build, assuming ImageMagick directory is a peer. --- PATCHES --- Index: nt_base.c =================================================================== RCS file: /abi/ImageMagick/magick/nt_base.c,v retrieving revision 1.1.1.1 diff -u -3 -r1.1.1.1 nt_base.c --- nt_base.c 31 Oct 2003 20:53:19 -0000 1.1.1.1 +++ nt_base.c 1 Nov 2003 15:35:33 -0000 @@ -171,7 +171,7 @@ % and DLL_PROCESS_DETACH. % */ -#if defined(_DLL) && defined( ProvideDllMain ) +#if defined(_DLL) && defined( ProvideDllMain ) && !defined(_LIB) BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) { #define MaxDLLPathExtent 1024 Index: configure.c =================================================================== RCS file: /abi/ImageMagick/magick/configure.c,v retrieving revision 1.1.1.1 diff -u -3 -r1.1.1.1 configure.c --- configure.c 31 Oct 2003 20:53:18 -0000 1.1.1.1 +++ configure.c 1 Nov 2003 15:18:48 -0000 @@ -479,8 +479,8 @@ *resource; resource=NTResourceToBlob(filename); - if (resource == (void *) NULL) - (void) AppendElementToLinkedList(options,xml); + if (resource != (void *) NULL) + (void) AppendElementToLinkedList(options,resource); } #endif if (GetNumberOfElementsInLinkedList(options) == 0) Index: bmp.c =================================================================== RCS file: /abi/ImageMagick/coders/bmp.c,v retrieving revision 1.1.1.1 diff -u -3 -r1.1.1.1 bmp.c --- bmp.c 31 Oct 2003 20:52:27 -0000 1.1.1.1 +++ bmp.c 1 Nov 2003 19:19:34 -0000 @@ -580,9 +580,14 @@ if (logging != False) (void) LogMagickEvent(CoderEvent,GetMagickModule()," BMP size: %lu", bmp_info.size); + // note: some otherwise valid BMP files have the wrong filesize in their header. +#if 0 if ((MagickSizeType) bmp_info.file_size != GetBlobSize(image)) (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageError, "LengthAndFilesizeDoNotMatch",image->filename); +#else + assert((MagickSizeType) bmp_info.file_size == GetBlobSize(image)); +#endif if (bmp_info.size == 12) { /*