com.bumptech.glide
Class BitmapTypeRequest<ModelType>
java.lang.Object
com.bumptech.glide.GenericRequestBuilder<ModelType,ImageVideoWrapper,android.graphics.Bitmap,TranscodeType>
com.bumptech.glide.BitmapRequestBuilder<ModelType,android.graphics.Bitmap>
com.bumptech.glide.BitmapTypeRequest<ModelType>
- Type Parameters:
ModelType
- The type of model to load the Bitmap
or transcoded class from.
- All Implemented Interfaces:
- Cloneable
public class BitmapTypeRequest<ModelType>
- extends BitmapRequestBuilder<ModelType,android.graphics.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(android.graphics.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. |
|
transcode(ResourceTranscoder<android.graphics.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, clone, decoder, diskCacheStrategy, dontAnimate, dontTransform, encoder, error, error, fallback, fallback, fitCenter, format, imageDecoder, into, listener, load, override, placeholder, placeholder, priority, signature, sizeMultiplier, skipMemoryCache, sourceEncoder, thumbnail, thumbnail, thumbnail, transcoder, transform, transform, videoDecoder |
transcode
public <R> BitmapRequestBuilder<ModelType,R> transcode(ResourceTranscoder<android.graphics.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(android.graphics.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()