私はこれを検索しましたが、12未満のAPIの場合、通常使用されるのはbitmap.getrowbytes*bitmap.getheightです。
ただし、画像の場合、次の情報を取得しています。
mBitmap.getRowBytes() = 320
mBitmap.getHeight() = 100
mBitmap.getWidth() = 80.
したがって、上記の式によれば、32,000が得られます。
ただし、adbからビットマップイメージを読み取っているファイルを確認すると、
ls -l
サイズは90Kbだと思います。
私は次のように画像を読んでいます:
Uri chosenImageUri = data.getData();
if (chosenImageUri != null) {
try {
InputStream photoStream = getContentResolver().openInputStream(chosenImageUri);
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inSampleSize = 4;
Bitmap mBitmap = BitmapFactory.decodeStream(photoStream,null, opts);
photoStream.close();
}
}
結果が異なるのはなぜですか?ありがとうございました。