The Image object is used to store color values and attributes associated with a raster file. Upon creation, the Image object is added to the session.images repository.
session.images[name]
This method creates an Image object from the contents of the specified file.
session.Image
Required arguments
A String specifying the repository name for the image.
A String specifying the file from which the image is to be read. The file extension must be specified and indicate the image format (.bmp, .gif, .jpg, .jpeg, .ico, .pcx, .png, .rgb, .tga, .tif, or .xpm).
Optional arguments
Return value
An Image object.
Exceptions
ValueError.
If fileName does not exist or can not be read:
If fileName references an unsupported image file format:
If the contents of fileName are corrupt or can not be decoded:
This method creates an Image object from a given frame of an existing Movie object.
Required arguments
A String specifying the repository name for the image.
A String specifying the name of the movie from which the image is to be extracted. The movie must exist in the session.movies repository.
An Int specifying the movie frame number defining the image to be extracted.
A Float specifying the time of the movie defining the image to be extracted.
Optional arguments
Return value
An Image object.
Exceptions
ValueError.
TypeError.
If movieName does not exist:
If frame references an non existing frame:
If time references an non existing frame:
If time and frame are given in the same command:
The Image object has members with the same names and descriptions as the arguments to the Image method.