Page 1 of 1
Porting Windows batch files to IM version 7
Posted: 2018-12-01T06:17:23-07:00
by whugemann
Is there anywhere a hands-on approach to what I have to do exactly when migrating my batch files to IM version 7? Do I just have to click the checkboxes for legacy support during installation and may I then expect my batch files to run mostly? I read
http://www.imagemagick.org/script/porting.php, but I doesn't really tell. I would like to migrate because of the coming CLAHE option, but there are quite a lot of scripts and people using them in our office ...
Re: Porting Windows batch files to IM version 7
Posted: 2018-12-01T07:18:15-07:00
by snibgo
whugemann wrote:Do I just have to click the checkboxes for legacy support during installation and may I then expect my batch files to run mostly?
Well, sort of.
The default v7 installation is HDRI, and v6 is non-HDRI. This may break scripts.
The legacy installation gives the syntax of v6, but the behaviour of v7.
Personally, I regard the legacy-within-v7 as a stop-gap. My own solution is to install both versions: v7 without legacy, and v6. Then "convert" runs v6, and "magick" (not "magick convert") runs v7.
I'm also upgrading my v6 scripts to use v7. But everything has to be tested, and this takes time.
Re: Porting Windows batch files to IM version 7
Posted: 2018-12-03T02:18:13-07:00
by whugemann
My own solution is to install both versions: v7 without legacy, and v6. Then "convert" runs v6, and "magick" (not "magick convert") runs v7.
Well, that sounds like a plan to me. I will take this road too (and report where it has led me ...)
Re: Porting Windows batch files to IM version 7
Posted: 2018-12-17T04:23:04-07:00
by whugemann
snibgo wrote: ↑2018-12-01T07:18:15-07:00
My own solution is to install both versions: v7 without legacy, and v6. Then "convert" runs v6, and "magick" (not "magick convert") runs v7.
Am I right that the ordering in the PATH environment variable matters? After I installed IM7 (without legacy support),
identify was no longer functioning, as it couldn't find its delegates anymore. After re-ordering the string in the PATH variable such that the IM6 path preceeded the IM7 path,
identify and all my older scripts were functioning again.
Is that an observation that you share? Is re-ordering the paths the official workaround for this problem?
Re: Porting Windows batch files to IM version 7
Posted: 2018-12-17T05:28:11-07:00
by snibgo
I don't know.
I use multiple versions of v6 (with different Q numbers, with different version numbers, with or without process modules, with different bugs) installed to different directories, and similarly multiple versions of v7. Usually none are on my system PATH.
Typically, I run either "%IM%convert" or "%IMG7%magick" for pre-built binaries or "%IMDEV%convert" or "%IM7DEV%magick" for versions that I have built.
Each of these has been indirectly set to a directory. For example, IM has been set to %IMG69950%, which has been set to C:\im\ImageMagick-6.9.9-50-Q16\.
I do sometimes temporarily change my PATH to put one version of IM at the front, but not usually.