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)