Java tutorial
//package com.java2s; import android.util.Log; public class Main { private static final String TAG = "BitmapUtil"; private static long calcBitmapSize(int width, int height, int sample) { long value = ((width / sample) * (height / sample) * 4) / 1024; Log.i(TAG, "calcBitmapSize, size = " + value); return value; } }