| メソッド |
説明 |
| compress(Bitmap.CompressFormat format, int quality, OutputStream stream) |
ビットマップ→ストリーム
| Bitmap.CompressFormat.JPEG |
JPEG |
| Bitmap.CompressFormat.PNG |
PNG |
|
| copy(Bitmap.Config config, boolean isMutable) |
ビットマップのコピー(コンフィグ/ミュータブルの変更) |
| copyPixelsFromBuffer(Buffer src) |
バッファ→ビットマップ |
| copyPixelsToBuffer(Buffer dst) |
ビットマップ→バッファ |
| createBitmap(Bitmap source, int x, int y, int width, int height, Matrix m, boolean filter) |
ビットマップの生成 |
| createBitmap(int width, int height, Bitmap.Config config) |
ビットマップの生成 |
| createBitmap(Bitmap source, int x, int y, int width, int height) |
ビットマップの生成 |
createBitmap(int[] colors, int offset, int stride, int width, int height,
Bitmap.Config config) |
ビットマップの生成 |
| createBitmap(Bitmap src) |
ビットマップの生成 |
| createBitmap(int[] colors, int width, int height, Bitmap.Config config) |
ビットマップの生成 |
| createScaledBitmap(Bitmap src, int dstWidth, int dstHeight, boolean filter) |
拡縮ビットマップの生成 |
| describeContents() |
パーセルのコンテンツの記述 |
| eraseColor(int c) |
ビットマップの単色塗り潰し |
| extractAlpha() |
Alphaだけ抜き出したビットマップの生成 |
| extractAlpha(Paint paint, int[] offsetXY) |
Alphaだけ抜き出したビットマップの生成 |
| getByteCount() |
ビットマップピクセルのバイト数の取得 |
| getConfig() |
コンフィグの取得
| Bitmap.Config.ALPHA_8 |
Alphaのみ |
| Bitmap.Config.ARGB_4444 |
128色 |
| Bitmap.Config.ARGB_8888 |
256色 |
| Bitmap.Config.RGB_565 |
Alphaなし |
|
| getDensity() |
密度の取得 |
| getGenerationId() |
ジェネレーションIDの取得 |
| getHeight() |
高さの取得 |
| getNinePatchChunk() |
ナインパッチチャンクの取得 |
| getPixel(int x, int y) |
ピクセルの取得 |
| getPixels(int[] pixels, int offset, int stride, int x, int y, int width, int height) |
ピクセル群の取得 |
| getRowBytes() |
ピクセルの列のバイト数 |
| getScaledHeight(int targetDensity) |
拡縮高さの取得 |
| getScaledHeight(DisplayMetrics metrics) |
拡縮高さの取得 |
| getScaledHeight(Canvas canvas) |
拡縮高さの取得 |
| getScaledWidth(DisplayMetrics metrics) |
拡縮幅の取得 |
| getScaledWidth(int targetDensity) |
拡縮幅の取得 |
| getScaledWidth(Canvas canvas) |
拡縮幅の取得 |
| getWidth() |
幅の取得 |
| hasAlpha() |
透過色を持っているかどうかの取得 |
| isMutable() |
ミュータブルかどうか
イミュータブルは不変でeraceColor()とかできない。
copy()してミュータブルに変換することも可能。 |
| isRecycled() |
リサイクフラグの取得 |
| prepareToDraw() |
描画準備 |
| recycle() |
リサイクルフラグを上げる |
| sameAs(Bitmap other) |
ビットマップの比較 |
| setDensity(int density) |
密度の指定 |
| setHasAlpha(boolean hasAlpha) |
透過色を持っているかどうかの指定 |
| setPixel(int x, int y, int color) |
ピクセルの指定 |
| setPixels(int[] pixels, int offset, int stride, int x, int y, int width, int height) |
ピクセル群の指定 |
| writeToParcel(Parcel p, int flags) |
パーセルへの描画 |