Open SujithManjavana opened 2 years ago
The quality of the cropped image is very low compared to the original. Lib version: 'com.github.yalantis:ucrop:2.2.6-native'
val destUri = Uri.fromFile(File(cacheDir, "dp.jpg")) val options = UCrop.Options() options.setCompressionFormat(Bitmap.CompressFormat.JPEG); options.setCompressionQuality(100) val cropIntent = UCrop.of(uri, destUri) .withOptions(options) .withAspectRatio(1F, 1F) .withMaxResultSize(512, 512) .getIntent(this) uCropResultLauncher.launch(cropIntent)
The quality of the cropped image is very low compared to the original. Lib version: 'com.github.yalantis:ucrop:2.2.6-native'
val destUri = Uri.fromFile(File(cacheDir, "dp.jpg")) val options = UCrop.Options() options.setCompressionFormat(Bitmap.CompressFormat.JPEG); options.setCompressionQuality(100) val cropIntent = UCrop.of(uri, destUri) .withOptions(options) .withAspectRatio(1F, 1F) .withMaxResultSize(512, 512) .getIntent(this) uCropResultLauncher.launch(cropIntent)