MediaResizer / pyxis.uzuki.live.mediaresizer.data / ImageResizeOption / Builder

Builder

class Builder

Constructors

<init>

Builder()

Functions

build

fun build(): ImageResizeOption

Build ImageResizeOption object.

setBitmapFilter

fun setBitmapFilter(filter: Boolean): Builder

set filter flag for better quality. true if the source should be filtered.

setCompressFormat

fun setCompressFormat(format: CompressFormat): Builder

set compress format and extension of output of resizing. it have three options to set, default is Bitmap.CompressFormat.JPEG see Bitmap.CompressFormat class to see all of available options.

setCompressQuality

fun setCompressQuality(compressQuality: Int): Builder

set compress quality of output of resizing. range is 0 and 100, else it throw IllegalArgumentException

setImageProcessMode

fun setImageProcessMode(mode: ImageMode): Builder

set the mode to work with Image Resizing. It have three options to set, default is ResizeAndCompress. see ImageMode class to see all of available options.

setImageResolution

fun setImageResolution(width: Int, height: Int): Builder

set desire width/height to resize image. It keep aspect ratio itself.

setScanRequest

fun setScanRequest(request: ScanRequest): Builder

set flag for requesting media scanning. to use this settings, please add follow statement in your Application class. MediaResizerGlobal.initializeApplication(this)