A script-fu script describes itself to Gimp using a call to script-fu-register. Part of the declaration describes the arguments to the script. In most cases the first argument is an image (SF-IMAGE ), and usually the second argument is a layer/drawable (SF-DRAWABLE). When they are present, these two arguments are implicitly set to the active image and drawable. You can declare more arguments that are passed to your script, and Gimp will pop our a dialogue for these (for instance SF-SPINNER for an up-down number input widget). There are about 50 SCM scripts installed with Gimp so you have some examples already.
IMHO instead of asking for two dimensions, you can ask for a single scale factor.
There is no point in setting the middle image to anything other than Normal if there is nothing visible below it.
If you really want to compare with the original, but the top two layers in a group. You can then set the group do Difference
IMHO instead of asking for two dimensions, you can ask for a single scale factor.
There is no point in setting the middle image to anything other than Normal if there is nothing visible below it.
If you really want to compare with the original, but the top two layers in a group. You can then set the group do Difference