Image(...)
This method creates an Image object from the contents of the specified file.
Path
session.Image
Required arguments
- name
A String specifying the repository name for the image.
- fileName
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
None.
Return value
An Image object.
Exceptions
ValueError.
- If fileName does not exist or can not be read:
ValueError: Unable to open image file
- If fileName references an unsupported image file format:
ValueError: Unsupported image format
- If the contents of fileName are corrupt or can not be decoded:
ValueError: Unable to decode image file