This simple script helps to clear "gray" paper-background for a scanned documents (pictures) to a white color. It is used by myself to clear lot of files. In batch mode, processed files must have extension JPG and changed versions will be saved to the same place, replacing original. Tested on Win32 GIMP v2.6, but i think will work with other 2.x too.
p.s. the main idea of the script is described on the this page (russian only, sorry).