ImageSource

fun ImageSource(file: Path, fileSystem: FileSystem, diskCacheKey: String? = null, closeable: AutoCloseable? = null, metadata: ImageSource.Metadata? = null): ImageSource

Create a new ImageSource backed by a Path.

Parameters

file

The file to read from.

fileSystem

The file system which contains file.

diskCacheKey

An optional cache key for the file in the disk cache.

closeable

An optional closeable reference that will be closed when the image source is closed.

metadata

Metadata for this image source.


fun ImageSource(source: BufferedSource, fileSystem: FileSystem, metadata: ImageSource.Metadata? = null): ImageSource

Create a new ImageSource backed by a BufferedSource.

Parameters

source

The buffered source to read from.

fileSystem

The file system which will be used to create a temporary file if necessary.

metadata

Metadata for this image source.