BitmapEncoder

open class BitmapEncoder : ResourceEncoder<T>

An com.bumptech.glide.load.ResourceEncoder that writes android.graphics.Bitmaps to java.io.OutputStreams.

android.graphics.Bitmaps that return true from ()} are written using PNG to preserve alpha and all other bitmaps are written using JPEG.

See also

android.graphics.Bitmap#compress(android.graphics.Bitmap.CompressFormat, int, * java.io.OutputStream)

Constructors

Link copied to clipboard
open fun BitmapEncoder(arrayPool: ArrayPool)
Link copied to clipboard
open fun BitmapEncoder()

Functions

Link copied to clipboard
open fun encode(    resource: Resource<Bitmap>,     file: File,     options: Options): Boolean
Writes the given data to the given output stream and returns True if the write completed successfully and should be committed.
Link copied to clipboard
open fun getEncodeStrategy(options: Options): EncodeStrategy

Properties

Link copied to clipboard
val COMPRESSION_FORMAT: Option<CompressFormat>
An android.graphics.Bitmap.
Link copied to clipboard
val COMPRESSION_QUALITY: Option<Integer>
An integer option between 0 and 100 that is used as the compression quality.