compressBySampleSize

open fun compressBySampleSize(src: Bitmap, sampleSize: Int): Bitmap

Return the compressed bitmap using sample size.

Return

the compressed bitmap

Parameters

src

The source of bitmap.

sampleSize

The sample size.

open fun compressBySampleSize(src: Bitmap, sampleSize: Int, recycle: Boolean): Bitmap

Return the compressed bitmap using sample size.

Return

the compressed bitmap

Parameters

src

The source of bitmap.

sampleSize

The sample size.

recycle

True to recycle the source of bitmap, false otherwise.

open fun compressBySampleSize(src: Bitmap, maxWidth: Int, maxHeight: Int): Bitmap

Return the compressed bitmap using sample size.

Return

the compressed bitmap

Parameters

src

The source of bitmap.

maxWidth

The maximum width.

maxHeight

The maximum height.

open fun compressBySampleSize(src: Bitmap, maxWidth: Int, maxHeight: Int, recycle: Boolean): Bitmap

Return the compressed bitmap using sample size.

Return

the compressed bitmap

Parameters

src

The source of bitmap.

maxWidth

The maximum width.

maxHeight

The maximum height.

recycle

True to recycle the source of bitmap, false otherwise.