Home | Trees | Index | Help |
---|
|
Support for loading and manipulating images.
The subclasses ofImageSpec
can be used to give an abstract
specification for an image. For example, the following object specifies
the result of flipping and rotating an image loaded from a file:
>>> FlipImage(RotateImage(ImageFile('foo.gif', 90), horiz=True))
To retrieve the image specified by an ImageSpec
, simply
use its load()
method. Image specifications are
useful because they allow us to pickle an object that uses an image
without pickling the image itself; or to describe an object that uses an
image without loading the actual image.
imagespec_grid
is used to generate a list
of image specifications for subimages of equal size extracted from a
single source image. It is typically used to load animation frames for an
animated sprite.
Classes | |
---|---|
CachedImage |
|
EmptyImage |
|
FlipImage |
|
ImageFile |
|
ImageSpec |
An abstract specification of an image. |
PatternImage |
Use one image as a 'pattern' to overlay on a template image. |
RotateImage |
|
ScaleImage |
|
SolidColor |
|
SubImage |
|
SuperImpose |
|
TileHoriz |
|
TileVert |
Function Summary | |
---|---|
Return a list of image specifications for subimages, of equal size, extracted from the given image. |
Function Details |
---|
imagespec_grid(imagespec, size, rows, border=1, reverse=False)Return a list of image specifications for subimages, of equal size, extracted from the given image. This is typically used to load the frames for an animation.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Sep 22 22:52:45 2005 | http://epydoc.sf.net |