-
- All Implemented Interfaces:
-
com.facebook.imagepipeline.platform.PlatformDecoder
@ThreadSafe() public abstract class DefaultDecoder implements PlatformDecoder
Bitmap decoder for ART VM (Lollipop and up).
-
-
Constructor Summary
Constructors Constructor Description DefaultDecoder(BitmapPool bitmapPool, Pools.Pool<ByteBuffer> decodeBuffers, PlatformDecoderOptions platformDecoderOptions)
-
Method Summary
Modifier and Type Method Description CloseableReference<Bitmap>decodeFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, @Nullable() Rect regionToDecode)CloseableReference<Bitmap>decodeJPEGFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, @Nullable() Rect regionToDecode, int length)CloseableReference<Bitmap>decodeFromEncodedImageWithColorSpace(EncodedImage encodedImage, Bitmap.Config bitmapConfig, @Nullable() Rect regionToDecode, @Nullable() ColorSpace colorSpace)Creates a bitmap from encoded bytes. CloseableReference<Bitmap>decodeJPEGFromEncodedImageWithColorSpace(EncodedImage encodedImage, Bitmap.Config bitmapConfig, @Nullable() Rect regionToDecode, int length, @Nullable() ColorSpace colorSpace)Creates a bitmap from encoded JPEG bytes. abstract intgetBitmapSize(int width, int height, BitmapFactory.Options options)-
Methods inherited from class com.facebook.imagepipeline.platform.PlatformDecoder
decodeFromEncodedImage, decodeFromEncodedImageWithColorSpace, decodeJPEGFromEncodedImage, decodeJPEGFromEncodedImageWithColorSpace -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
DefaultDecoder
DefaultDecoder(BitmapPool bitmapPool, Pools.Pool<ByteBuffer> decodeBuffers, PlatformDecoderOptions platformDecoderOptions)
-
-
Method Detail
-
decodeFromEncodedImage
@Nullable() CloseableReference<Bitmap> decodeFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, @Nullable() Rect regionToDecode)
-
decodeJPEGFromEncodedImage
@Nullable() CloseableReference<Bitmap> decodeJPEGFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, @Nullable() Rect regionToDecode, int length)
-
decodeFromEncodedImageWithColorSpace
@Nullable() CloseableReference<Bitmap> decodeFromEncodedImageWithColorSpace(EncodedImage encodedImage, Bitmap.Config bitmapConfig, @Nullable() Rect regionToDecode, @Nullable() ColorSpace colorSpace)
Creates a bitmap from encoded bytes.
- Parameters:
encodedImage- the encoded image with a reference to the encoded bytesbitmapConfig- the android.graphics.Bitmap.Config used to create the decodedBitmapregionToDecode- optional image region to decode or null to decode the whole imagecolorSpace- the target color space of the decoded bitmap, must be one of the named colorspace in android.graphics.ColorSpace.Named.
-
decodeJPEGFromEncodedImageWithColorSpace
@Nullable() CloseableReference<Bitmap> decodeJPEGFromEncodedImageWithColorSpace(EncodedImage encodedImage, Bitmap.Config bitmapConfig, @Nullable() Rect regionToDecode, int length, @Nullable() ColorSpace colorSpace)
Creates a bitmap from encoded JPEG bytes. Supports a partial JPEG image.
- Parameters:
encodedImage- the encoded image with reference to the encoded bytesbitmapConfig- the android.graphics.Bitmap.Config used to create the decodedBitmapregionToDecode- optional image region to decode or null to decode the whole imagelength- the number of encoded bytes in the buffercolorSpace- the target color space of the decoded bitmap, must be one of the named colorspace in android.graphics.ColorSpace.Named.
-
getBitmapSize
abstract int getBitmapSize(int width, int height, BitmapFactory.Options options)
-
-
-
-