Downsampler

class Downsampler

Downsamples, decodes, and rotates images according to their exif orientation using .

Constructors

Link copied to clipboard
open fun Downsampler(    parsers: List<ImageHeaderParser>,     displayMetrics: DisplayMetrics,     bitmapPool: BitmapPool,     byteArrayPool: ArrayPool)

Types

Link copied to clipboard
interface DecodeCallbacks
Callbacks for key points during decodes.

Functions

Link copied to clipboard
open fun decode(    parcelFileDescriptor: ParcelFileDescriptor,     outWidth: Int,     outHeight: Int,     options: Options): Resource<Bitmap>

open fun decode(    is: InputStream,     outWidth: Int,     outHeight: Int,     options: Options): Resource<Bitmap>
open fun decode(    is: InputStream,     requestedWidth: Int,     requestedHeight: Int,     options: Options,     callbacks: Downsampler.DecodeCallbacks): Resource<Bitmap>
Returns a Bitmap decoded from the given InputStream that is rotated to match any EXIF data present in the stream and that is downsampled according to the given dimensions and any provided com.bumptech.glide.load.resource.bitmap.DownsampleStrategy option.
open fun decode(    buffer: ByteBuffer,     requestedWidth: Int,     requestedHeight: Int,     options: Options): Resource<Bitmap>
Identical to decode, except that it accepts a in place of an InputStream.
Link copied to clipboard
open fun handles(source: ParcelFileDescriptor): Boolean
open fun handles(is: InputStream): Boolean
open fun handles(byteBuffer: ByteBuffer): Boolean

Properties

Link copied to clipboard
val ALLOW_HARDWARE_CONFIG: Option<Boolean>
Indicates that it's safe or unsafe to decode Bitmaps with HARDWARE.
Link copied to clipboard
val DECODE_FORMAT: Option<DecodeFormat>
Indicates the com.bumptech.glide.load.DecodeFormat that will be used in conjunction with the image format to determine the android.graphics.Bitmap.
Link copied to clipboard
val DOWNSAMPLE_STRATEGY: Option<DownsampleStrategy>
Indicates the com.bumptech.glide.load.resource.bitmap.DownsampleStrategy option that will be used to calculate the sample size to use to downsample an image given the original and target dimensions of the image.
Link copied to clipboard
val FIX_BITMAP_SIZE_TO_REQUESTED_DIMENSIONS: Option<Boolean>
Ensure that the size of the bitmap is fixed to the requested width and height of the resource from the caller.
Link copied to clipboard
val PREFERRED_COLOR_SPACE: Option<PreferredColorSpace>
Sets the PreferredColorSpace that will be used along with the version of Android and color space of the requested image to determine the final color space used to decode the image.