Image.this

Constructs an instance of this class by loading its representation from the file with the specified name. Throws an error if an error occurs while loading the image, or if the result is an image of an unsupported type. <p> This constructor is provided for convenience when loading a single image only. If the specified file contains multiple images, only the first one will be used.

@param device the device on which to create the image @param filename the name of the file to load the image from

@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> <li>ERROR_NULL_ARGUMENT - if the file name is null</li> </ul> @exception SWTException <ul> <li>ERROR_IO - if an IO error occurs while reading from the file</li> <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> <li>ERROR_UNSUPPORTED_DEPTH - if the image file describes an image with an unsupported depth</li> <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> </ul> @exception SWTError <ul> <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> </ul>

Meta