setImageSource

fun setImageSource(source: ImageSource?, resetMatrices: Boolean = true)

Sets the source of the image to display, which is decoded by regions at the resolution required by the display transformation. Any previous bitmap is recycled and any previous source is closed. The provided source is owned by this view from now on: it is closed when it is replaced by another image or source, and it must not be closed by the caller. Setting the source that is already set does nothing.

Parameters

source

source to be set, or null to clear the image.

resetMatrices

true to reset transformation matrices, false otherwise.