compressByQuality

open fun compressByQuality(src: Bitmap, @IntRange(from = 0, to = 100quality: Int): Bitmap

Return the compressed bitmap using quality.

Return

the compressed bitmap

Parameters

src

The source of bitmap.

quality

The quality.

open fun compressByQuality(src: Bitmap, @IntRange(from = 0, to = 100quality: Int, recycle: Boolean): Bitmap

Return the compressed bitmap using quality.

Return

the compressed bitmap

Parameters

src

The source of bitmap.

quality

The quality.

recycle

True to recycle the source of bitmap, false otherwise.

open fun compressByQuality(src: Bitmap, maxByteSize: Long): Bitmap

Return the compressed bitmap using quality.

Return

the compressed bitmap

Parameters

src

The source of bitmap.

maxByteSize

The maximum size of byte.

open fun compressByQuality(src: Bitmap, maxByteSize: Long, recycle: Boolean): Bitmap

Return the compressed bitmap using quality.

Return

the compressed bitmap

Parameters

src

The source of bitmap.

maxByteSize

The maximum size of byte.

recycle

True to recycle the source of bitmap, false otherwise.