IMGrotate rotates an IMG file, either 90 or 180 degrees clockwise. We call the latter--somewhat inaccurately--a "flip". (We haven't needed other rotation angles, so we haven't implemented them.)
The IMG format is an image format output by a few programs, including the one that drives the scanner we have. (Again, we haven't needed other image formats, so we haven't implemented them.)
Both the input and output are IMG files.
The current implementation of IMGrotate uses an extremely slow and stupid algorithm, because it was a quick hack. It would be useful to replace it with a better algorithm. See section Program features, for a reference.
The physical construction of a source to be scanned may make it hard or impossible to end up with an upright image. But the task of extracting characters from an image is complicated by allowing for a rotated image. Hence this program to turn rotated images upright.
By default, the name of the output file is the same as the input file; both are extended with `.img' if necessary. If this would result in the output overwriting the input, `x' is prepended to the output name.
You specify clockwise rotation of an image with the option `-rotate-clockwise'. This rotates the input 90 degrees clockwise. For example, the following (an `h' on its side):
***** * * ***********
You specify "flip" rotation of an image with the option `-flip'. This flips the input end for end and reverses left and right, i.e., does a 180 degree rotation. For example, the following (an `h' upside down and backwards):
* * * * * * *** * * *
This section describes the options that IMGrotate accepts. See section Command-line options, for general option syntax.
The name of the main input file (see section The main input file) is called image-name below.