Android-Image-Cropper icon indicating copy to clipboard operation
Android-Image-Cropper copied to clipboard

Can't import 'options' in 4.5.0 version

Open p42rthicle opened this issue 2 years ago • 4 comments

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?

p42rthicle avatar Sep 27 '23 13:09 p42rthicle

the same

NicolasGodfather avatar Oct 04 '23 14:10 NicolasGodfather

Try this

var cropImageContractOptions = CropImageContractOptions(uri,CropImageOptions(imageSourceIncludeGallery = true,imageSourceIncludeCamera= true));
cropImageLauncher.launch(cropImageContractOptions);

Himanshu3009 avatar Oct 12 '23 06:10 Himanshu3009

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?

HamzaAkram-shyk avatar Jan 03 '24 12:01 HamzaAkram-shyk

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, ) ) )

ronycodex avatar Feb 27 '24 18:02 ronycodex