Disponibilidad: IRIX.
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:
(x, y, z)
where
x and y are the size of the image in pixels and
z is the number of
bytes per pixel. Only 3 byte RGB pixels and 1 byte greyscale pixels
are currently supported.
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.