(I've added a note below about installing ImageMagick from the Command line and options there.)Ok, working thourgh this I have found that the following basically works :-)
Using ImageMagic's archive:
https://legacy.imagemagick.org/script/download.php#windowsI obtained Specifically:
ImageMagick-6.9.12-Q16-HDRI - ImageMagick-6.9.12-58-Q16-HDRI-x64-dll.exe
https://imagemagick.org/archive//binaries/ImageMagick-6.9.12-58-Q16-HDRI-x64-dll.exeInstalling without doing file associations or anything else effectively created it as portable with dlls
If it is installed from the command line, rather than from just clicking on it in Windows FileExplorer, you can get help for extra installation options ...
ImageMagick-6.9.12-58-Q16-HDRI-x64-dll.exe /?
A website is mentioned there with commandline options ...
https://jrsoftware.org/ishelp/index.php?topic=setupcmdlineWhich gives a lead to:
https://jrsoftware.org/ishelp/index.php?topic=technotesOne of the option combinations found in its listings is:
So –
ImageMagick-6.9.12-58-Q16-HDRI-x64-dll.exe /PORTABLE=1
(You can add more options, or handle many of them later in the installer GUI.)
This
/PORTABLE=1 may pertain to the instaler itself, but also seems to help reomve any deeper things being placed in Widows system, (some one with more knowledge could chime in here).
I think you end up with a redistributable portable version wioth dlls in it.
Then casting around on the internet and also using:
Reference on Environements variables:https://www.imagemagick.org/script/resources.phpI altered my batch file as follows. . .
path=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-6.9.12-Q16-HDRI;%path%
set MAGICK_HOME=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-6.9.12-Q16-HDRI
set MAGICK_CODER_MODULE_PATH=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-6.9.12-Q16-HDRI\modules\coders
REM you might get away with not using this one . . .
set DYLD_LIBRARY_PATH=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-6.9.12-Q16-HDRI\lib
wanddemo
As said it works, Jpeg attached :-) I was a little surprised at the outcome, but the original PNG is of course untouched and looks the same.
But still I wonder, is this a robust solution?I tried this just to make sure somehow 7.1 hadn't solved its own problems . . .
path=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI;%path%
set MAGICK_HOME=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI\
set MAGICK_CODER_MODULE_PATH=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI\modules\coders
set DYLD_LIBRARY_PATH=E:\Projects\Lazarus\00-64bit\BTABB-3\prototype_main\utils\ImageMagick-7.1.0-Q16-HDRI\lib
wanddemo
. . . but although I did not yet get the original 7.1 error regarding: "CORE_RL_wand_.dll"
— I instead got a PNG delegate error, which I can not seem to resolve, and I asume that I won't(?).
How would I bury the necessary ImageMagick-6.9.12 things (environment variables and path to ImageMagick" in my batch file, into a Lazarus GUI Project settings for independant execution please?
(I realise the for RUN debuging, I can point to the dlls,
but if I want to leave things
effectively portable, how is that done for an exeutable, or does my .exe have to be called from a batch file as above to avoid altering system settings?)
TIA
Paul