从位图缩放jpg图像。压缩android
我正在转换,位图到jpeg使用从位图缩放jpg图像。压缩android,android,bitmap,Android,Bitmap,我正在转换,位图到jpeg使用 val file = File(filePath) val fos = FileOutputStream(file) profileImageBitmap.compress(Bitmap.CompressFormat.JPEG,100,fos) jpeg看起来不错。但是它非常小。我原以为这是jpeg的有损特性,但当我尝试将位图转换为png时,它也降到了相同的大小。有没有办法增加从位图压缩的jpeg的大小?在转换为jpeg之前,可以使用createScaledBi
val file = File(filePath)
val fos = FileOutputStream(file)
profileImageBitmap.compress(Bitmap.CompressFormat.JPEG,100,fos)
jpeg看起来不错。但是它非常小。我原以为这是jpeg的有损特性,但当我尝试将位图转换为png时,它也降到了相同的大小。有没有办法增加从位图压缩的jpeg的大小?在转换为jpeg之前,可以使用createScaledBitmap放大位图,尝试将true作为过滤器布尔值传递以获得更好的结果