code: public static int getSizeInByteForBitmap(int width, int height, Bitmap.Config bitmapConfig) {
      return width * height * getPixelSizeForBitmapConfig(bitmapConfig);
    }
docs: Returns the size in byte of an image with specific size
  and {@link android.graphics.Bitmap.Config}
  @param width the width of the image
  @param height the height of the image
  @param bitmapConfig the {@link android.graphics.Bitmap.Config} for which the size in byte
  will be returned
  @return