public static int bitmapSize(int width, int height, Bitmap.Config config) {
    return BitmapUtil.getSizeInByteForBitmap(width, height, config);
  }
Helper class for creating bitmap mocks in tests.
imagepipeline-test/src/main/java/com/facebook/imagepipeline/testing/MockBitmapFactory.java