public interface

PlatformDecoder

com.facebook.imagepipeline.platform.PlatformDecoder
Known Indirect Subclasses

Summary

Public Methods
abstract CloseableReference<Bitmap> decodeFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig)
Creates a bitmap from encoded bytes.
abstract CloseableReference<Bitmap> decodeJPEGFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, int length)
Creates a bitmap from encoded JPEG bytes.

Public Methods

public abstract CloseableReference<Bitmap> decodeFromEncodedImage (EncodedImage encodedImage, Bitmap.Config bitmapConfig)

Creates a bitmap from encoded bytes. Supports JPEG but callers should use decodeJPEGFromEncodedImage(EncodedImage, Bitmap.Config, int) for partial JPEGs.

Parameters
encodedImage the reference to the encoded image with the reference to the encoded bytes
bitmapConfig the android.graphics.Bitmap.Config used to create the decoded Bitmap
Returns
  • the bitmap
Throws
if the pool is full
OutOfMemoryError if the Bitmap cannot be allocated

public abstract CloseableReference<Bitmap> decodeJPEGFromEncodedImage (EncodedImage encodedImage, Bitmap.Config bitmapConfig, int length)

Creates a bitmap from encoded JPEG bytes. Supports a partial JPEG image.

Parameters
encodedImage the reference to the encoded image with the reference to the encoded bytes
bitmapConfig the android.graphics.Bitmap.Config used to create the decoded Bitmap
length the number of encoded bytes in the buffer
Returns
  • the bitmap
Throws
if the pool is full
OutOfMemoryError if the Bitmap cannot be allocated