klyn.gui.images.Image.getImage
method

    public static getImage(filename as String) as Image:

Description

Factory method to get an image instance based on the file extension.

Supported extensions are `.svg`, `.bmp`, `.gif`, `.jpg`, `.jpeg`, `.tif` and `.tiff`.

Parameters

Parameter | Description
--- | ---
`filename` | The filename of the image.

Returns

An instance of the appropriate image class.

Example

    image = Image.getImage("photo.jpeg")