The version of FreeImage.h used to generate the SWIG FFI definitions has been modified slightly from the original. Do a diff if you're curious what had to be "fixed". Basically, the FI_ENUM and FI_STRUCT pre-processor macros had to be tweaked, and all the typedefs that used the DLL_CALLCONV macro had to be replaced (the new defs for those are in swig_freeimage.i). See \_devel\FreeImage391Win32\FreeImage\Dist for the original. All of this was used with SWIG, v1.3.29. - Jeff Usher (10/21/2006)