The ImageMagick files are in an ImageMagick subfolder of the application executable folder.
The relevant Pascal unit is here: https://drive.google.com/file/d/0B1u-03 ... sp=sharing
In summary:
Create an ImageMagick subfolder in the application executable folder with the same structure as an installed ImageMagick would create in Program Files:
.\ImageMagick holds all DLL library and xml configuration files from the ImageMagick primary folder
(ImageMagick installation: Program Files\ImageMagick)
.\ImageMagick\coders holds all IM_MOD_*.DLL files
(ImageMagick installation: Program Files\ImageMagick\coders)
.\ImageMagick\filters holds all FILTER_*.DLL files
(ImageMagick installation: Program Files\ImageMagick\filters)
Don't define the ImageMagick function as external. Define procedure and function variables and use LoadLibrary / GetProcAdress.
In Pascal this looks like
Code: Select all
var
IsMagickWandInstantiated: function: MagickBooleanType; cdecl;
...
hWandExport:=LoadLibrary(Application_Folder\ImageMagick\CORE_RL_MagickWand_.dll)
pointer(IsMagickWandInstantiated):=GetProcAddress(hWandExport,'IsMagickWandInstantiated');
Path=Application_Folder;%Path%
LD_LIBRARY_PATH=Application_Folder\ImageMagick
MAGICK_CODER_FILTER_PATH=Application_Folder\ImageMagick\filters
MAGICK_CODER_MODULE_PATH=Application_Folder\ImageMagick\coders
MAGICK_CONFIGURE_PATH=Application_Folder\ImageMagick
Enjoy!