Open phongbm opened 8 months ago
Like this:
val cropImage = rememberLauncherForActivityResult(CropImageContract()) { result -> if (result.isSuccessful) { // Use the returned uri. val uriContent = result.uriContent val uriFilePath = result.getUriFilePath(context) // optional usage } else { // An error occurred. val exception = result.error } }
and start with e.g. this:
cropImage.launch( CropImageContractOptions( uri = null, cropImageOptions = CropImageOptions( imageSourceIncludeGallery = true, imageSourceIncludeCamera = false, fixAspectRatio = true // aspectRatioX = 1, // aspectRatioY = 1, ) ) )
I want to use CropImageView in Compose project, how to do that?