private void internalPrepareBitmap(@Nullable CloseableReference<CloseableImage> newResult) {
      if (newResult == null || !newResult.isValid()) {
        return;
      }

      final CloseableImage closeableImage = newResult.get();
      if (closeableImage == null || closeableImage.isClosed()) {
        return;
      }

      if (closeableImage instanceof CloseableStaticBitmap) {
        final CloseableStaticBitmap staticBitmap = (CloseableStaticBitmap) closeableImage;
        final Bitmap bitmap = staticBitmap.getUnderlyingBitmap();
        if (bitmap == null) {
          return;
        }

        final int bitmapByteCount = bitmap.getRowBytes() * bitmap.getHeight();
        if (bitmapByteCount < mMinBitmapSizeBytes) {
          return;
        }
        if (bitmapByteCount > mMaxBitmapSizeBytes) {
          return;
        }

        bitmap.prepareToDraw();
      }
    }
@param inputProducer The next producer in the pipeline
@param minBitmapSizeBytes Bitmaps with a {@link Bitmap#getByteCount()} smaller than this value
    are not uploaded
@param maxBitmapSizeBytes Bitmaps with a {@link Bitmap#getByteCount()} larger than this value
    are not uploaded
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/BitmapPrepareProducer.java