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