CanHub / Android-Image-Cropper

Image Cropping Library for Android, optimised for Camera / Gallery.
https://canhub.github.io/
Apache License 2.0
1.17k stars 240 forks source link

Can't import 'options' in 4.5.0 version #592

Open p42rthicle opened 9 months ago

p42rthicle commented 9 months ago
cropImageLauncher.launch(
        option {

        }
      )

Can't import the options block here from com.canhub.cropper.options

What is the replacement for it in 4.5.0 version?

NicolasGodfather commented 9 months ago

the same

Himanshu3009 commented 9 months ago

Try this

var cropImageContractOptions = CropImageContractOptions(uri,CropImageOptions(imageSourceIncludeGallery = true,imageSourceIncludeCamera= true));
cropImageLauncher.launch(cropImageContractOptions);
HamzaAkram-shyk commented 6 months ago

cropImage.launch( options(uri = imageUri) { setGuidelines(Guidelines.ON) setOutputCompressFormat(CompressFormat.PNG) } )

Can't import these things

What is the replacement for it in the 4.5.0 version?

ronycodex commented 4 months ago

Hey I have just found the solution. Drop a ❣️ if i helped you.

cropImage.launch( CropImageContractOptions( uri = uri, cropImageOptions = CropImageOptions( guidelines = CropImageView.Guidelines.ON, outputCompressFormat = Bitmap.CompressFormat.PNG, outputCompressQuality = 50, fixAspectRatio = true, aspectRatioX = 1, aspectRatioY= 1, ) ) )