com.bumptech.glide.load.resource.transcode
Class BitmapBytesTranscoder
java.lang.Object
com.bumptech.glide.load.resource.transcode.BitmapBytesTranscoder
- All Implemented Interfaces:
- ResourceTranscoder<android.graphics.Bitmap,byte[]>
public class BitmapBytesTranscoder
- extends Object
- implements ResourceTranscoder<android.graphics.Bitmap,byte[]>
An ResourceTranscoder
that converts
Bitmap
s into byte arrays using
Bitmap.compress(android.graphics.Bitmap.CompressFormat, int, java.io.OutputStream)
.
Method Summary |
String |
getId()
|
Resource<byte[]> |
transcode(Resource<android.graphics.Bitmap> toTranscode)
Transcodes the given resource to the new resource type and returns the wew resource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BitmapBytesTranscoder
public BitmapBytesTranscoder()
BitmapBytesTranscoder
public BitmapBytesTranscoder(android.graphics.Bitmap.CompressFormat compressFormat,
int quality)
transcode
public Resource<byte[]> transcode(Resource<android.graphics.Bitmap> toTranscode)
- Description copied from interface:
ResourceTranscoder
- Transcodes the given resource to the new resource type and returns the wew resource.
- Specified by:
transcode
in interface ResourceTranscoder<android.graphics.Bitmap,byte[]>
- Parameters:
toTranscode
- The resource to transcode.
getId
public String getId()
- Specified by:
getId
in interface ResourceTranscoder<android.graphics.Bitmap,byte[]>