com.bumptech.glide
Class BitmapTypeRequest<ModelType>

java.lang.Object
  extended by com.bumptech.glide.GenericRequestBuilder<ModelType,ImageVideoWrapper,Bitmap,TranscodeType>
      extended by com.bumptech.glide.BitmapRequestBuilder<ModelType,Bitmap>
          extended by com.bumptech.glide.BitmapTypeRequest<ModelType>
Type Parameters:
ModelType - The type of model to load the Bitmap or transcoded class from.

public class BitmapTypeRequest<ModelType>
extends BitmapRequestBuilder<ModelType,Bitmap>

A class for creating a load request that either loads an Bitmap directly or that adds an ResourceTranscoder to transcode the Bitmap into another resource type.


Method Summary
 BitmapRequestBuilder<ModelType,byte[]> toBytes()
          Transcodes the decoded and transformed Bitmap to bytes by compressing it as a JPEG to a byte array.
 BitmapRequestBuilder<ModelType,byte[]> toBytes(Bitmap.CompressFormat compressFormat, int quality)
          Transcodes the decoded and transformed Bitmap to bytes by compressing it using the given format and quality to a byte array.
<R> BitmapRequestBuilder<ModelType,R>
transcode(ResourceTranscoder<Bitmap,R> transcoder, Class<R> transcodeClass)
          Sets a transcoder to transcode the decoded and transformed Bitmap into another resource type.
 
Methods inherited from class com.bumptech.glide.BitmapRequestBuilder
animate, animate, animate, approximate, asIs, atMost, cacheDecoder, centerCrop, decoder, diskCacheStrategy, dontAnimate, dontTransform, encoder, error, error, fitCenter, format, imageDecoder, into, listener, override, placeholder, placeholder, priority, sizeMultiplier, skipMemoryCache, sourceEncoder, thumbnail, thumbnail, thumbnail, transcoder, transform, transform, videoDecoder
 
Methods inherited from class com.bumptech.glide.GenericRequestBuilder
into, into
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

transcode

public <R> BitmapRequestBuilder<ModelType,R> transcode(ResourceTranscoder<Bitmap,R> transcoder,
                                                       Class<R> transcodeClass)
Sets a transcoder to transcode the decoded and transformed Bitmap into another resource type.

Type Parameters:
R - The type of the resource the Bitmap will be transcoded to.
Parameters:
transcoder - The transoder to use.
transcodeClass - The Class of the resource the Bitmap will be transcoded to.
Returns:
This request builder.

toBytes

public BitmapRequestBuilder<ModelType,byte[]> toBytes()
Transcodes the decoded and transformed Bitmap to bytes by compressing it as a JPEG to a byte array. array.

Returns:
This request builder.
See Also:
toBytes(android.graphics.Bitmap.CompressFormat, int)

toBytes

public BitmapRequestBuilder<ModelType,byte[]> toBytes(Bitmap.CompressFormat compressFormat,
                                                      int quality)
Transcodes the decoded and transformed Bitmap to bytes by compressing it using the given format and quality to a byte array.

Parameters:
compressFormat - The Bitmap.CompressFormat to use to compress the Bitmap.
quality - The quality level from 0-100 to use to compress the Bitmap.
Returns:
This request builder.
See Also:
Bitmap.compress(android.graphics.Bitmap.CompressFormat, int, java.io.OutputStream), toBytes()