Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.0.0-rc01

BitmapCompat

public final class BitmapCompat
extends Object

java.lang.Object
   ↳ androidx.core.graphics.BitmapCompat


Helper for accessing features in Bitmap.

Summary

Public methods

static int getAllocationByteCount(Bitmap bitmap)

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

static boolean hasMipMap(Bitmap bitmap)
static void setHasMipMap(Bitmap bitmap, boolean hasMipMap)

Inherited methods

Public methods

getAllocationByteCount

added in version 1.0.0
public static int getAllocationByteCount (Bitmap bitmap)

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

Returns
int the allocation size in bytes

hasMipMap

added in version 1.0.0
public static boolean hasMipMap (Bitmap bitmap)

Parameters
bitmap Bitmap

Returns
boolean

setHasMipMap

added in version 1.0.0
public static void setHasMipMap (Bitmap bitmap, 
                boolean hasMipMap)

Parameters
bitmap Bitmap

hasMipMap boolean