ImageDriver
ImageDriver is responsible for probing, loading and saving images
Since
0.4.3
Functions
Link copied to clipboard
Convert an image to a data-url
Link copied to clipboard
Loads a cubemap image from a file or URL. A cubemap is a texture typically used in 3D rendering, consisting of six images representing the sides of a cube.
abstract fun loadCubemapImage(buffer: MPPBuffer, name: String?, formatHint: ImageFileFormat?): CubemapImageData
Loads a cubemap image from the provided buffer. The cubemap is typically a texture with six faces corresponding to the sides of a cube, used in 3D rendering.
Link copied to clipboard
abstract fun loadImage(fileOrUrl: String, formatHint: ImageFileFormat?, allowSRGB: Boolean, details: ImageFileDetails?): ImageData
Loads an image from a file path or URL.
abstract fun loadImage(buffer: MPPBuffer, name: String?, formatHint: ImageFileFormat?, allowSRGB: Boolean, details: ImageFileDetails? = null): ImageData
Loads an image from the provided buffer.
Link copied to clipboard
open fun saveImage(imageData: ImageData, filename: String, saveContext: ImageSaveContext.() -> ImageSaveConfiguration)
Saves the provided image data to the specified filename using a custom save configuration.
Save an image to filename
abstract fun saveImage(imageData: ImageData, filename: String, configuration: ImageSaveConfiguration)
Saves the provided image data to the specified filename using the given configuration.