loadImage

Script::loadImage

Loads an image from a file in the Asset Manager and returns a pointer to the loaded image.

Declaration

Image* loadImage(const std::string& filePath);

Parameters

Name

Type

Description

filePath

const std::string&

Path to the file to load.

Returns

A pointer to an Image containing information about the loaded image.

If the image could not be loaded (for example: if the file does not exist, or the Asset Manager or Asset Loader Module does not support this image file format), the returned pointer is nullptr.