Bitmap Image Source
ImageSource backed by a bitmap that is held whole in memory.
The bitmap is owned by the caller: this source never recycles it, not even on close. The caller can keep drawing on the bitmap when it is mutable, and the edits are visible in the next decoded region. Reads of the wrapped bitmap are synchronised on it, so callers must synchronise on the same bitmap while drawing on it.
Parameters
bitmap
caller-owned bitmap to wrap.
Properties
Functions
Link copied to clipboard
Notifies that the contents of the image changed, keeping its size.
Link copied to clipboard
open override fun decodeRegion(region: Rect, sampleSize: Int, config: Bitmap.Config, reuse: Bitmap?): Bitmap?
Draws a region of the wrapped bitmap scaled by 1 / sampleSize.