Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

BitmapCompat

class BitmapCompat
kotlin.Any
   ↳ androidx.core.graphics.BitmapCompat

Helper for accessing features in android.graphics.Bitmap.

Summary

Public methods
static Boolean
hasMipMap(@NonNull bitmap: Bitmap)

static Unit
setHasMipMap(@NonNull bitmap: Bitmap, hasMipMap: Boolean)

static Int
getAllocationByteCount(@NonNull bitmap: Bitmap)

Returns the size of the allocated memory used to store this bitmap's pixels in a backwards compatible way.

Public methods

hasMipMap

static fun hasMipMap(@NonNull bitmap: Bitmap): Boolean

setHasMipMap

static fun setHasMipMap(@NonNull bitmap: Bitmap, hasMipMap: Boolean): Unit

getAllocationByteCount

static fun getAllocationByteCount(@NonNull bitmap: Bitmap): Int

Returns the size of the allocated memory used to store this bitmap's pixels in a backwards compatible way.

Parameters
bitmap Bitmap: the bitmap in which to return its allocation size
Return
Int: the allocation size in bytes