ModelType
- The type of model to load the Bitmap
or transcoded class from.public class BitmapTypeRequest<ModelType> extends BitmapRequestBuilder<ModelType,Bitmap>
Bitmap
directly or that adds an
ResourceTranscoder
to transcode the Bitmap
into another
resource type.context, lifecycle, modelClass, requestTracker, transcodeClass
Modifier and Type | Method and Description |
---|---|
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. |
animate, animate, animate, animate, approximate, asIs, atMost, cacheDecoder, centerCrop, clone, crossFade, crossFade, crossFade, crossFade, 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
into, into, preload, preload
public <R> BitmapRequestBuilder<ModelType,R> transcode(ResourceTranscoder<Bitmap,R> transcoder, Class<R> transcodeClass)
Bitmap
into another resource type.public BitmapRequestBuilder<ModelType,byte[]> toBytes()
Bitmap
to bytes by compressing it as a JPEG to a byte array.
array.toBytes(android.graphics.Bitmap.CompressFormat, int)
public BitmapRequestBuilder<ModelType,byte[]> toBytes(Bitmap.CompressFormat compressFormat, int quality)
Bitmap
to bytes by compressing it using the
given format and quality to a byte array.compressFormat
- The Bitmap.CompressFormat
to use to compress the Bitmap
.quality
- The quality level from 0-100 to use to compress the Bitmap
.Bitmap.compress(android.graphics.Bitmap.CompressFormat, int, java.io.OutputStream)
,
toBytes()