public CloseableStaticBitmap decodeStaticImage(
      final EncodedImage encodedImage, ImageDecodeOptions options) {
    CloseableReference<Bitmap> bitmapReference =
        mPlatformDecoder.decodeFromEncodedImageWithColorSpace(
            encodedImage, options.bitmapConfig, null, options.colorSpace);
    try {
      boolean didApplyTransformation =
          TransformationUtils.maybeApplyTransformation(
              options.bitmapTransformation, bitmapReference);

      Preconditions.checkNotNull(bitmapReference);
      CloseableStaticBitmap closeableStaticBitmap =
          CloseableStaticBitmap.of(
              bitmapReference,
              ImmutableQualityInfo.FULL_QUALITY,
              encodedImage.getRotationAngle(),
              encodedImage.getExifOrientation());

      closeableStaticBitmap.putExtra(
          HasExtraData.KEY_IS_ROUNDED,
          didApplyTransformation && options.bitmapTransformation instanceof CircularTransformation);

      return closeableStaticBitmap;
    } finally {
      CloseableReference.closeSafely(bitmapReference);
    }
  }
@param encodedImage input image (encoded bytes plus meta data)
@return a CloseableStaticBitmap
imagepipeline/src/main/java/com/facebook/imagepipeline/decoder/DefaultImageDecoder.java