Image
based on this prototype
This method first checks if there is a security manager installed. If so, the method calls the security manager's checkRead
method with the specified file to ensure that the image creation is allowed.
@param filename the name of a file containing pixel datain a recognized file format.
@return an image which gets its pixel data fromthe specified file.
@throws SecurityException if a security manager exists and itscheckRead method doesn't allow the operation.
@see #getImage(java.lang.String)
Note: this method differs from createResource(Device) in that the returned image must be disposed directly, whereas an image obtained from createResource(...) must be disposed by calling destroyResource(...). It is not possible to mix-and-match. If you obtained the Image from this method, you must not dispose it by calling destroyResource. Clients are encouraged to use create/destroyResource and downcast the result to Image rather than using createImage.
Note: it is still possible for this method to return null
in extreme cases, for example if SWT runs out of image handles.
null
if the image could not becreated
|
|