ImageSource

Provider of the pixels of a large image, which can be decoded one region at a time.

An implementation exposes the size and EXIF orientation of the image as it is stored, and decodes arbitrary rectangular regions of it at a reduced resolution. All methods other than the properties are called on a worker thread, and never concurrently: implementations do not need to be thread safe for decoding, but must not depend on being called from the main thread.

Inheritors

Properties

Link copied to clipboard
abstract val orientation: Int

EXIF orientation of the image: one of the 8 ExifInterface.ORIENTATION_* values, or ExifInterface.ORIENTATION_NORMAL when it is unknown.

Link copied to clipboard
abstract val storedHeight: Int

Height of the image in stored pixels, before applying orientation.

Link copied to clipboard
abstract val storedWidth: Int

Width of the image in stored pixels, before applying orientation.

Functions

Link copied to clipboard
abstract override fun close()

Releases the resources held by this source.

Link copied to clipboard
open fun contentChanged()

Notifies that the contents of the image changed, keeping its size.

Link copied to clipboard
abstract fun decodeRegion(region: Rect, sampleSize: Int, config: Bitmap.Config, reuse: Bitmap?): Bitmap?

Decodes a region of the image.