-
- All Implemented Interfaces:
-
com.cloudinary.android.preprocess.ResourceDecoder
public class BitmapDecoder implements ResourceDecoder<Bitmap>
Decodes a bitmap from a payload. If given width and height the decoding process will take them into account to decode the bitmap efficiently but will not necessarily resize the bitmap.
-
-
Constructor Summary
Constructors Constructor Description BitmapDecoder()Create a new decoder. BitmapDecoder(int width, int height)Create a new decoder taking the required width and height into account to decode the bitmap efficiently.
-
Method Summary
-
-
Method Detail
-
decode
Bitmap decode(Context context, Payload payload)
Decodes a bitmap from the given payload. If the bitmap is at least two times larger than the requireddimensions it will decode a version scaled down by a factor. Note: The dimensions of the decoded bitmapwill not necessarily be equal to width and height. Forexact resizing combine this decoder with Limit processing step, or use limitDimensionsChain.
- Parameters:
context- Android context.payload- Payload to extract the bitmap from
-
-
-
-