loadImage
Loads an image from a file path or URL.
Return
An ImageData instance representing the loaded image. The caller is responsible for managing the lifecycle of the returned object.
Parameters
The file path or URL of the image to be loaded.
An optional hint for the file format of the image. Can be null if no hint is provided.
A flag indicating whether sRGB color space should be allowed for the image.
An optional ImageFileDetails object containing additional metadata about the image, such as dimensions and channels.
Loads an image from the provided buffer.
Return
An ImageData instance representing the loaded image. The caller is responsible for managing the lifecycle of the returned object.
Parameters
The buffer containing the image data to load.
An optional human-readable name for the image, used for debugging or error reporting purposes.
An optional hint for the format of the image. Can be null if the format can be automatically detected.
A flag indicating whether to allow the image to be loaded in the sRGB color space.
An optional ImageFileDetails object to populate with additional metadata about the image, such as dimensions and channels.