Package coil.decode

Types

AssetMetadata
Link copied to clipboard
class AssetMetadata(fileName: String) : ImageSource.Metadata
Metadata containing the fileName of an Android asset.
BitmapFactoryDecoder
Link copied to clipboard
class BitmapFactoryDecoder(source: ImageSource, options: Options, parallelismLock: Semaphore, exifOrientationPolicy: ExifOrientationPolicy) : Decoder
The base Decoder that uses BitmapFactory to decode a given ImageSource.
ContentMetadata
Link copied to clipboard
class ContentMetadata(uri: Uri) : ImageSource.Metadata
Metadata containing the uri of a content URI.
DataSource
Link copied to clipboard
enum DataSource : Enum<DataSource>
Represents the source that an image was loaded from.
Decoder
Link copied to clipboard
fun fun interface Decoder
A Decoder converts a SourceResult into a Drawable.
DecodeResult
Link copied to clipboard
class DecodeResult(drawable: Drawable, isSampled: Boolean)
The result of Decoder.decode.
DecodeUtils
Link copied to clipboard
object DecodeUtils
A collection of useful utility methods for decoding images.
ExifOrientationPolicy
Link copied to clipboard
enum ExifOrientationPolicy : Enum<ExifOrientationPolicy>
Specifies the policy for handling the EXIF orientation flag.
ImageSource
Link copied to clipboard
sealed class ImageSource : Closeable
Provides access to the image data to be decoded.
ResourceMetadata
Link copied to clipboard
class ResourceMetadata(packageName: String, @DrawableRes() resId: Int, density: Int) : ImageSource.Metadata
Metadata containing the packageName, resId, and density of an Android resource.

Functions

ImageSource
Link copied to clipboard
@JvmName(name = create)
fun ImageSource(source: BufferedSource, context: Context): ImageSource
Create a new ImageSource backed by a BufferedSource.
@JvmName(name = create)
fun ImageSource(source: BufferedSource, cacheDirectory: File): ImageSource
Create a new ImageSource backed by a BufferedSource.
@JvmName(name = create)
fun ImageSource(source: BufferedSource, context: Context, metadata: ImageSource.Metadata? = null): ImageSource
Create a new ImageSource backed by a BufferedSource.
@JvmName(name = create)
fun ImageSource(source: BufferedSource, cacheDirectory: File, metadata: ImageSource.Metadata? = null): ImageSource
Create a new ImageSource backed by a BufferedSource.
@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.
@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.