public class BitmapBytesTranscoder extends Object implements ResourceTranscoder<Bitmap,byte[]>
ResourceTranscoder
that converts Bitmap
s into byte arrays using (android.graphics.Bitmap.CompressFormat,
int, java.io.OutputStream)
.Constructor and Description |
---|
BitmapBytesTranscoder() |
BitmapBytesTranscoder(Bitmap.CompressFormat compressFormat,
int quality) |
Modifier and Type | Method and Description |
---|---|
Resource<byte[]> |
transcode(Resource<Bitmap> toTranscode,
Options options)
Transcodes the given resource to the new resource type and returns the new resource.
|
public BitmapBytesTranscoder()
public BitmapBytesTranscoder(@NonNull Bitmap.CompressFormat compressFormat, int quality)
@Nullable public Resource<byte[]> transcode(@NonNull Resource<Bitmap> toTranscode, @NonNull Options options)
ResourceTranscoder
transcode
in interface ResourceTranscoder<Bitmap,byte[]>
toTranscode
- The resource to transcode.