-
public interface PlatformDecoder
-
-
Method Summary
Modifier and Type Method Description abstract CloseableReference<Bitmap>decodeFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, Rect regionToDecode)Creates a bitmap from encoded bytes. abstract CloseableReference<Bitmap>decodeJPEGFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, Rect regionToDecode, Integer length)Creates a bitmap from encoded JPEG bytes. abstract CloseableReference<Bitmap>decodeFromEncodedImageWithColorSpace(EncodedImage encodedImage, Bitmap.Config bitmapConfig, Rect regionToDecode, ColorSpace colorSpace)Creates a bitmap from encoded bytes. abstract CloseableReference<Bitmap>decodeJPEGFromEncodedImageWithColorSpace(EncodedImage encodedImage, Bitmap.Config bitmapConfig, Rect regionToDecode, Integer length, ColorSpace colorSpace)Creates a bitmap from encoded JPEG bytes. -
-
Method Detail
-
decodeFromEncodedImage
abstract CloseableReference<Bitmap> decodeFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, Rect regionToDecode)
Creates a bitmap from encoded bytes. Supports JPEG but callers should use decodeJPEGFromEncodedImage for partial JPEGs. In addition, a region to decode can be supplied in order to minimize memory usage. NOTE: Not all platform decoders necessarily support supplying specific regions.
Note: This needs to be kept because of dependencies issues.
- Parameters:
encodedImage- the reference to the encoded image with the reference to the encoded bytesbitmapConfig- the android.graphics.Bitmap.Config used to create the decoded BitmapregionToDecode- optional image region to decode or null to decode the whole image
-
decodeJPEGFromEncodedImage
abstract CloseableReference<Bitmap> decodeJPEGFromEncodedImage(EncodedImage encodedImage, Bitmap.Config bitmapConfig, Rect regionToDecode, Integer length)
Creates a bitmap from encoded JPEG bytes. Supports a partial JPEG image. In addition, a region to decode can be supplied in order to minimize memory usage. NOTE: Not all platform decoders necessarily support supplying specific regions.
Note: This needs to be kept because of dependencies issues.
- Parameters:
encodedImage- the reference to the encoded image with the reference to the encoded bytesbitmapConfig- the android.graphics.Bitmap.Config used to create the decoded BitmapregionToDecode- optional image region to decode or null to decode the whole image.length- the number of encoded bytes in the buffer
-
decodeFromEncodedImageWithColorSpace
abstract CloseableReference<Bitmap> decodeFromEncodedImageWithColorSpace(EncodedImage encodedImage, Bitmap.Config bitmapConfig, Rect regionToDecode, ColorSpace colorSpace)
Creates a bitmap from encoded bytes. Supports JPEG but callers should use decodeJPEGFromEncodedImage for partial JPEGs. In addition, a region to decode can be supplied in order to minimize memory usage. NOTE: Not all platform decoders necessarily support supplying specific regions.
- Parameters:
encodedImage- the reference to the encoded image with the reference to the encoded bytesbitmapConfig- the android.graphics.Bitmap.Config used to create the decoded BitmapregionToDecode- 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 color space in android.graphics.ColorSpace.Named.
-
decodeJPEGFromEncodedImageWithColorSpace
abstract CloseableReference<Bitmap> decodeJPEGFromEncodedImageWithColorSpace(EncodedImage encodedImage, Bitmap.Config bitmapConfig, Rect regionToDecode, Integer length, ColorSpace colorSpace)
Creates a bitmap from encoded JPEG bytes. Supports a partial JPEG image. In addition, a region to decode can be supplied in order to minimize memory usage. NOTE: Not all platform decoders necessarily support supplying specific regions.
- Parameters:
encodedImage- the reference to the encoded image with the reference to the encoded bytesbitmapConfig- the android.graphics.Bitmap.Config used to create the decoded BitmapregionToDecode- optional image region to decode or null to decode the whole image.length- the number of encoded bytes in the buffercolorSpace- the target color space of the decoded bitmap, must be one of the named color space in android.graphics.ColorSpace.Named.
-
-
-
-