Porting Windows batch files to IM version 7
- whugemann
- Posts: 289
- Joined: 2011-03-28T07:11:31-07:00
- Authentication code: 8675308
- Location: Münster, Germany 52°N,7.6°E
Porting Windows batch files to IM version 7
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 ...
Last edited by whugemann on 2018-12-03T02:14:35-07:00, edited 2 times in total.
Wolfgang Hugemann
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Porting Windows batch files to IM version 7
Well, sort of.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?
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.
snibgo's IM pages: im.snibgo.com
- whugemann
- Posts: 289
- Joined: 2011-03-28T07:11:31-07:00
- Authentication code: 8675308
- Location: Münster, Germany 52°N,7.6°E
Re: Porting Windows batch files to IM version 7
Well, that sounds like a plan to me. I will take this road too (and report where it has led me ...)My own solution is to install both versions: v7 without legacy, and v6. Then "convert" runs v6, and "magick" (not "magick convert") runs v7.
Wolfgang Hugemann
- whugemann
- Posts: 289
- Joined: 2011-03-28T07:11:31-07:00
- Authentication code: 8675308
- Location: Münster, Germany 52°N,7.6°E
Re: Porting Windows batch files to IM version 7
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?
Wolfgang Hugemann
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Porting Windows batch files to IM version 7
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.
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.
snibgo's IM pages: im.snibgo.com