com.bumptech.glide.load.resource.transcode
Class BitmapBytesTranscoder

java.lang.Object
  extended by 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 Bitmaps into byte arrays using Bitmap.compress(android.graphics.Bitmap.CompressFormat, int, java.io.OutputStream).


Constructor Summary
BitmapBytesTranscoder()
           
BitmapBytesTranscoder(Bitmap.CompressFormat compressFormat, int quality)
           
 
Method Summary
 String getId()
           
 Resource<byte[]> transcode(Resource<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
 

Constructor Detail

BitmapBytesTranscoder

public BitmapBytesTranscoder()

BitmapBytesTranscoder

public BitmapBytesTranscoder(Bitmap.CompressFormat compressFormat,
                             int quality)
Method Detail

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[]>