ImageSource

@JvmName(name = create)
fun ImageSource(file: Path, fileSystem: FileSystem = FileSystem.SYSTEM, diskCacheKey: String? = null, closeable: Closeable? = null): ImageSource

Create a new ImageSource backed by a File.

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.

@JvmName(name = create)
fun ImageSource(file: Path, fileSystem: FileSystem = FileSystem.SYSTEM, diskCacheKey: String? = null, closeable: Closeable? = null, metadata: ImageSource.Metadata? = null): ImageSource

Create a new ImageSource backed by a File.

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.

@JvmName(name = create)
fun ImageSource(source: BufferedSource, context: Context): ImageSource

Create a new ImageSource backed by a BufferedSource.

Parameters

source

The buffered source to read from.

context

A context used to resolve a safe cache directory.

@JvmName(name = create)
fun ImageSource(source: BufferedSource, context: Context, metadata: ImageSource.Metadata? = null): ImageSource

Create a new ImageSource backed by a BufferedSource.

Parameters

source

The buffered source to read from.

context

A context used to resolve a safe cache directory.

metadata

Metadata for this image source.

@JvmName(name = create)
fun ImageSource(source: BufferedSource, cacheDirectory: File): ImageSource

Create a new ImageSource backed by a BufferedSource.

Parameters

source

The buffered source to read from.

cacheDirectory

The directory to create temporary files in if ImageSource.file is called.

@JvmName(name = create)
fun ImageSource(source: BufferedSource, cacheDirectory: File, metadata: ImageSource.Metadata? = null): ImageSource

Create a new ImageSource backed by a BufferedSource.

Parameters

source

The buffered source to read from.

cacheDirectory

The directory to create temporary files in if ImageSource.file is called.

metadata

Metadata for this image source.