decode Region
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.
Return
decoded bitmap, or null if the region is empty or does not intersect the bitmap, or if the wrapped bitmap has been recycled.
Parameters
region
region to draw, expressed in pixels of the wrapped bitmap.
sample Size
subsampling factor. Values lower than 1 are treated as 1.
config
bitmap configuration requested for the result. When it is Bitmap.Config.HARDWARE a hardware copy of the drawn bitmap is returned.
reuse
bitmap to draw into when it is mutable, not recycled, not hardware and has exactly the size of the result. Otherwise a new Bitmap.Config.ARGB_8888 bitmap is used.