|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of resource this decoder can decode a Bitmap
from.public interface BitmapDecoder<T>
A bitmap decoder for a given resource type.
Method Summary | |
---|---|
Bitmap |
decode(T resource,
BitmapPool bitmapPool,
int outWidth,
int outHeight,
DecodeFormat decodeFormat)
Returns a decoded bitmap for a given resource and target dimensions. |
String |
getId()
Returns some unique String id that distinguishes this decoder from any other decoder. |
Method Detail |
---|
Bitmap decode(T resource, BitmapPool bitmapPool, int outWidth, int outHeight, DecodeFormat decodeFormat) throws Exception
resource
- The resource to decode, managed by the caller, no need to clean it up.bitmapPool
- A bitmap pool that can be used to reuse bitmaps during the load. Any bitmaps created or
obtained from the pool other than the bitmap returned by this method should be returned to the
pool.outWidth
- The target width for the returned bitmap (need not match exactly).outHeight
- The target height for the returned bitmap (need not match exactly).decodeFormat
- The desired configuration for the returned bitmap.
Exception
String getId()
This method can return the empty string if for all practical purposes it applies no transformations to the
data while loading the resource. For Bitmap
s this would mean at a minimum doing no
downsampling and also probably always producing Bitmap
s with
Bitmap.Config.ARGB_8888
as their config.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |