code: @TargetApi(19) // @TargetApi(VERSION_CODES.KITKAT)
      public static long getBitmapSize(BitmapDrawable value) {
          if (null == value) {
              return 0;
          }
          Bitmap bitmap = value.getBitmap();
  
          // From KitKat onward use getAllocationByteCount() as allocated bytes can potentially be
          // larger than bitmap byte count.
          if (Version.hasKitKat()) {
              return bitmap.getAllocationByteCount();
          }
  
          if (Version.hasHoneycombMR1()) {
              return bitmap.getByteCount();
          }
  
          // Pre HC-MR1
          return bitmap.getRowBytes() * bitmap.getHeight();
      }
docs: Get the size in bytes of a bitmap in a BitmapDrawable. Note that from Android 4.4 (KitKat) onward this returns the allocated memory size of the bitmap which can be larger than the actual bitmap data byte count (in the case it was re-used).
  
  @param value
  @return size in bytes