I have adapted the 1.2.2 script to suit my own working methods, and published resampHM.bat with a number of trials at
http://im.snibgo.com/resamphm.htmMy script takes parameters instead of prompting for values. The other major change is that there is only a single convert command. Thus any deconvolution doesn't spend time (and lose precision) converting to sRGB, writing a file, reading the file, and converting to RGB.
My script expects to find identify.exe in directory %IM%, and convert.exe in %IM32f%. For my web page, %IM32f%convert.exe is Q32 HDRI.
The script can auto-select the method from downsampling or upsampling. See the page for details. I don't think the IM utilites can find resized dimensions without also creating the image in memory. But a trivial utility could be written to take a width, height and resize, call ParseMetaGeometry() in geometry.c, and return the new dimensions.
I shouldn't judge the results from a single image, but I gotta say: I love the downsampling with sharpen. It's much better than I get with "-resize -unsharp".
A note on colorspaces and profiles: Resample_by_Percentage_V122.bat writes any embedded profile to a file, then flags the image as sRGB with "-set colorspace sRGB". This will give inaccurate linearization. After saving the profile, it would be better to convert the image to sRGB with "-profile sRGB.icc", perhaps providing a path to that file. (The IM installation directory contains sRGB.icc.) At the end of the convert command, the "-profile" operation will then convert the image back to the saved ICC profile.
My page describes how to adapt my script for non-sRGB colorspaces. As almost all my work is in sRGB, I haven't automated this.