The imgfile module allows Python programs to access SGI imglib image files (also known as ".rgb" files). The module is far from complete, but is provided anyway since the functionality that there is is enough in some cases. Currently, colormap files are not supported.
The module defines the following variables and functions:
Alternatively, you can specify a filter to use to smoothen the image after scaling. The filter forms supported are 'impulse', 'box', 'triangle', 'quadratic' and 'gaussian'. If a filter is specified blur is an optional parameter specifying the blurriness of the filter. It defaults to 1.0.
readscaled() makes no attempt to keep the aspect ratio correct, so that is the users' responsibility.