writeImage

abstract fun writeImage(bitmap: Bitmap, compressFormat: Bitmap.CompressFormat, quality: Int, destination: File)

Write Bitmap to the destination File

Parameters

bitmap

the source Bitmap image

compressFormat

Bitmap.CompressFormat The format of the compressed image

quality

Int Hint to the compressor, 0-100. 0 meaning compress for small size, 100 meaning compress for max quality. Some formats, like PNG which is lossless, will ignore the quality setting

destination

the destination file

Throws

in case of IO operation problems