loadImage

abstract fun loadImage(fileOrUrl: String, formatHint: ImageFileFormat?, allowSRGB: Boolean, details: ImageFileDetails?): ImageData(source)

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

fileOrUrl

The file path or URL of the image to be loaded.

formatHint

An optional hint for the file format of the image. Can be null if no hint is provided.

allowSRGB

A flag indicating whether sRGB color space should be allowed for the image.

details

An optional ImageFileDetails object containing additional metadata about the image, such as dimensions and channels.


abstract fun loadImage(    buffer: MPPBuffer,     name: String?,     formatHint: ImageFileFormat?,     allowSRGB: Boolean,     details: ImageFileDetails? = null): ImageData(source)

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

buffer

The buffer containing the image data to load.

name

An optional human-readable name for the image, used for debugging or error reporting purposes.

formatHint

An optional hint for the format of the image. Can be null if the format can be automatically detected.

allowSRGB

A flag indicating whether to allow the image to be loaded in the sRGB color space.

details

An optional ImageFileDetails object to populate with additional metadata about the image, such as dimensions and channels.