public class BitmapTarget
extends java.lang.Object
BitmapTarget is provided to the Spectrum.decode(com.facebook.spectrum.EncodedImageSource, com.facebook.spectrum.BitmapTarget, com.facebook.spectrum.options.DecodeOptions, java.lang.Object) or Spectrum.transform(android.graphics.Bitmap, com.facebook.spectrum.BitmapTarget, com.facebook.spectrum.options.TransformOptions, java.lang.Object) methods.
The BitmapTarget is an object that will allocate an Android Bitmap when asked
by the underlying implementation. Can be overridden to cater for custom Bitmap allocation
implementation.
| Constructor and Description |
|---|
BitmapTarget() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createBitmapArgb(int width,
int height)
Allocates a bitmap with the given width, height, and
Bitmap.Config#ARGB_8888. |
android.graphics.Bitmap |
getBitmap() |
public boolean createBitmapArgb(int width,
int height)
Bitmap.Config#ARGB_8888.java.lang.IllegalStateException - if the target already has an allocated Bitmap.@Nullable public android.graphics.Bitmap getBitmap()
Bitmap created by createBitmapArgb(int, int). Returns
null if there has been no call to createBitmapArgb(int, int).