fromAsset

Creates an image source from an asset.

Return

created image source, which must be closed when no longer needed.

Parameters

assets

asset manager containing the asset.

path

path of the asset.

Throws

if the asset cannot be read or its format is not supported.