Class of android.graphics · Bitmap.java · Android's reference
public final class Bitmap implements android.os.Parcelable
Pixels in host memory, ARGB as ints (unpremultiplied, as getPixel returns them). The renderer uploads a bitmap when a frame draws it and its generation changed. Drawing into it with a Canvas records a display list.
Page 1 2
public static final int DENSITY_NONE = 0 sourcepublic static final android.os.Parcelable.Creator<Bitmap> CREATOR sourcepublic static int[] takeFreed() sourceThe IDs of the bitmaps gone since the last call
public int[] takePixels() sourceThe pixels to upload (all of them), or null when the app set none since the last call
public int id() sourceThe bitmap's number for the renderer, and its pixels' generation.
public int generation() sourcepublic int[] pixels() sourcepublic DisplayList drawingOrNull() sourceWhat canvases drew into the bitmap since the renderer last took it, or null
public static Bitmap createBitmap(int width, int height, Config config) sourcepublic static Bitmap createBitmap(int width, int height, Config config, boolean hasAlpha) sourcepublic static Bitmap createBitmap(int width, int height, Config config, boolean hasAlpha, ColorSpace colorSpace) sourcepublic static Bitmap createBitmap(android.util.DisplayMetrics display, int width, int height, Config config) sourcepublic static Bitmap createBitmap(android.util.DisplayMetrics display, int width, int height, Config config, boolean hasAlpha, ColorSpace colorSpace) sourcepublic static Bitmap createBitmap(int[] colors, int width, int height, Config config) sourcepublic static Bitmap createBitmap(int[] colors, int offset, int stride, int width, int height, Config config) sourcepublic static Bitmap createBitmap(Bitmap src) sourcepublic static Bitmap createBitmap(Bitmap src, int x, int y, int width, int height) sourcepublic static Bitmap createBitmap(Bitmap src, int x, int y, int width, int height, Matrix m, boolean filter) sourceA part of src through a matrix, drawn on the GPU as Android's Skia draws it
public static Bitmap createScaledBitmap(Bitmap src, int dstWidth, int dstHeight, boolean filter) sourcepublic static Bitmap createBitmap(Picture source) sourcepublic static Bitmap createBitmap(Picture source, int width, int height, Config config) sourcepublic int getWidth() sourcepublic int getHeight() sourcepublic int getScaledWidth(int targetDensity) sourcepublic int getScaledHeight(int targetDensity) sourcepublic int getScaledWidth(Canvas canvas) sourcepublic int getScaledHeight(Canvas canvas) sourcepublic int getDensity() sourcepublic void setDensity(int density) sourcepublic final Config getConfig() sourcepublic int getRowBytes() sourcepublic final int getByteCount() sourcepublic final int getAllocationByteCount() sourcepublic final boolean hasAlpha() sourcepublic void setHasAlpha(boolean hasAlpha) sourcepublic final boolean hasMipMap() sourcepublic final void setHasMipMap(boolean hasMipMap) empty body sourcePage 1 2
Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.