Package-level declarations

Types

Link copied to clipboard
actual typealias Bitmap = android.graphics.Bitmap

A grid of pixels.

expect class Bitmap

A grid of pixels.

A grid of pixels.

Link copied to clipboard
actual class BitmapImage : Image

An Image that's backed by a Bitmap.

expect class BitmapImage : Image

An Image that's backed by a Bitmap.

actual class BitmapImage : Image

An Image that's backed by a Bitmap.

Link copied to clipboard
actual typealias Canvas = android.graphics.Canvas

A graphics surface that can be drawn on.

expect class Canvas

A graphics surface that can be drawn on.

A graphics surface that can be drawn on.

Link copied to clipboard
actual class ColorImage(val color: Int, val width: Int, val height: Int, val size: Long, val shareable: Boolean) : Image

An image that draws a color.

expect class ColorImage(color: Int = 0xFF000000.toInt(), width: Int = -1, height: Int = -1, size: Long = 0, shareable: Boolean = true) : Image

An image that draws a color.

actual class ColorImage(val color: Int, val width: Int, val height: Int, val size: Long, val shareable: Boolean) : Image

An image that draws a color.

Link copied to clipboard

Registry for all the components that an ImageLoader uses to fulfil image requests.

Link copied to clipboard

An Image backed by an Android Drawable.

Link copied to clipboard
actual abstract class EventListener : ImageRequest.Listener

A listener for tracking the progress of an image request. This class is useful for measuring analytics, performance, or other metrics tracking.

expect abstract class EventListener : ImageRequest.Listener

A listener for tracking the progress of an image request. This class is useful for measuring analytics, performance, or other metrics tracking.

actual abstract class EventListener : ImageRequest.Listener

A listener for tracking the progress of an image request. This class is useful for measuring analytics, performance, or other metrics tracking.

Link copied to clipboard
class Extras

A map of key/value pairs to support extensions.

Link copied to clipboard
interface Image

An image that can be drawn on a canvas.

Link copied to clipboard

A Drawable backed by a generic Image.

Link copied to clipboard
interface ImageLoader

A service class that loads images by executing ImageRequests. Image loaders handle caching, data fetching, image decoding, request management, memory management, and more.

Link copied to clipboard
actual typealias PlatformContext = Context

Represents a platform-specific context that acts as an interface to global information about an application environment.

expect abstract class PlatformContext

Represents a platform-specific context that acts as an interface to global information about an application environment.

actual abstract class PlatformContext

Represents a platform-specific context that acts as an interface to global information about an application environment.

Link copied to clipboard
class Uri

A uniform resource locator. See RFC 3986.

Properties

Link copied to clipboard

Returns the URI's Uri.path formatted according to the URI's native Uri.separator.

Link copied to clipboard

Return the separate segments of the Uri.path.

Functions

Link copied to clipboard
Link copied to clipboard
fun Drawable.asImage(shareable: Boolean): Image

Convert a Bitmap into an Image.

expect fun Bitmap.asImage(shareable: Boolean = true): BitmapImage

Convert a Bitmap into an Image.

Convert a Bitmap into an Image.

Link copied to clipboard

Sets the strategy for handling the EXIF orientation flag for images decoded by BitmapFactoryDecoder.

Link copied to clipboard

Sets the maximum number of parallel BitmapFactory or ImageDecoder decode operations at once.

Link copied to clipboard

Execute the request and block the current thread until it completes.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Enables using ImageDecoder as this image loader's main Decoder on API 29 and above. If false, BitmapFactory is used on all API levels.

Link copied to clipboard

Create a new ImageLoader without configuration.

Reduces the memory cache's MemoryCache.maxSize to a percent of MemoryCache.initialMaxSize while the app is in the background (i.e. while its process lifecycle state is not at least Lifecycle.State.STARTED).

Link copied to clipboard
Link copied to clipboard
operator fun Extras.plus(other: Extras): Extras
Link copied to clipboard

Enables adding all components (fetchers and decoders) that are supported by the service locator to this ImageLoader's ComponentRegistry. All of Coil's first party decoders and fetchers are supported.

Link copied to clipboard
Link copied to clipboard
actual fun Image.toBitmap(width: Int, height: Int): Bitmap

Convert an Image into a Bitmap.

fun Image.toBitmap(width: Int, height: Int, config: Bitmap.Config): Bitmap
expect fun Image.toBitmap(width: Int = this.width, height: Int = this.height): Bitmap

Convert an Image into a Bitmap.

actual fun Image.toBitmap(width: Int, height: Int): Bitmap

Convert an Image into a Bitmap.

fun Image.toBitmap(width: Int, height: Int, colorType: ColorType, colorAlphaType: ColorAlphaType, colorSpace: ColorSpace?): Bitmap
Link copied to clipboard
Link copied to clipboard
fun String.toUri(separator: String = Path.DIRECTORY_SEPARATOR): Uri

Parse this String into a Uri. This method will not throw if the URI is malformed.

Link copied to clipboard
fun Uri(scheme: String? = null, authority: String? = null, path: String? = null, query: String? = null, fragment: String? = null, separator: String = Path.DIRECTORY_SEPARATOR): Uri

Create a Uri from parts without parsing.