ImageDriver

interface ImageDriver(source)

ImageDriver is responsible for probing, loading and saving images

Since

0.4.3

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun imageToDataUrl(imageData: ImageData, formatHint: ImageFileFormat?): String

Convert an image to a data-url

Link copied to clipboard
abstract fun loadCubemapImage(fileOrUrl: String, formatHint: ImageFileFormat?): CubemapImageData
abstract fun loadCubemapImage(buffer: MPPBuffer, name: String?, formatHint: ImageFileFormat?): CubemapImageData
Link copied to clipboard
abstract fun loadImage(fileOrUrl: String, formatHint: ImageFileFormat?, allowSRGB: Boolean): ImageData

Load an image located at fileOrUrl

abstract fun loadImage(buffer: MPPBuffer, name: String?, formatHint: ImageFileFormat?, allowSRGB: Boolean): ImageData

Load an image located at fileOrUrl

Link copied to clipboard
abstract fun probeImage(fileOrUrl: String): ImageFileDetails?

Probe an image located at fileOrUrl

abstract fun probeImage(buffer: MPPBuffer, formatHint: ImageFileFormat?): ImageFileDetails?

Probe an image from buffer

Link copied to clipboard
open fun saveImage(imageData: ImageData, filename: String, saveContext: ImageSaveContext.() -> ImageSaveConfiguration)
abstract fun saveImage(imageData: ImageData, filename: String, configuration: ImageSaveConfiguration)

open fun saveImage(imageData: ImageData, filename: String, formatHint: ImageFileFormat?)

Save an image to filename